Add demo.sh — shell wrapper for raw terminal mode
Raw terminal mode must be set by the parent process (the shell), not from inside SBCL. sb-ext:run-program subprocesses cannot reliably access the controlling terminal for stty operations. ./demo.sh sets raw mode via stty, runs sbcl --script demo.lisp, and restores terminal state on exit (EXIT, INT, TERM). demo.lisp no longer calls with-raw-terminal — it assumes the calling shell has already set raw mode.
This commit is contained in:
10
demo.lisp
10
demo.lisp
@@ -1,9 +1,5 @@
|
||||
;;; demo.lisp — cl-tty interactive demo
|
||||
;;; Run: sbcl --script demo.lisp
|
||||
;;;
|
||||
;;; Demonstrates: backend detection, raw terminal mode, key/mouse input,
|
||||
;;; layout engine, component rendering pipeline, framebuffer diff flush,
|
||||
;;; text-input, textarea, select, dialog, scrollbox, tabbar.
|
||||
|
||||
;; Load cl-tty directly via ASDF (no Quicklisp dependency needed —
|
||||
;; sb-posix is built into SBCL, no external libraries required).
|
||||
@@ -124,10 +120,8 @@
|
||||
t)))
|
||||
|
||||
(defun run-demo ()
|
||||
"Run the demo. Assumes raw terminal mode is already set by the
|
||||
shell wrapper (./demo) or by running:
|
||||
stty raw -echo -isig -icanon min 1 time 0
|
||||
sbcl --script demo.lisp"
|
||||
"Run the demo. Raw terminal mode should already be set by the
|
||||
./demo.sh shell wrapper."
|
||||
(init-app-state)
|
||||
(let* ((backend (detect-backend))
|
||||
(w 80) (h 24))
|
||||
|
||||
Reference in New Issue
Block a user