fix: input timeout bugs — read-raw-byte, SS3, parse-csi-params all use sub-second timeouts now (get-internal-real-time replaces get-universal-time which truncated to integer seconds)

This commit is contained in:
Hermes Agent
2026-05-12 13:42:39 +00:00
parent 30fdb1def8
commit b21daa99b8
19 changed files with 1044 additions and 231 deletions

View File

@@ -0,0 +1,24 @@
;; Binary search for "function T" warning in input.lisp
(load "~/quicklisp/setup.lisp")
(ql:register-local-projects)
(ql:quickload :cl-tty :silent t)
(defun test-subset (name from to)
(format t "~&=== Testing ~a (lines ~d-~d) ===~%" name from to)
(with-open-file (s "src/components/input.lisp")
(loop repeat (1- from) do (read-line s nil))
(loop with code = (make-string 0 :element-type 'character :adjustable t :fill-pointer t)
for i from from to to
for line = (read-line s nil nil)
while line
do (vector-push-extend #\Newline code)
(dotimes (j (length line)) (vector-push-extend (char line j) code))
finally (handler-bind ((warning (lambda (c)
(format t " WARNING: ~a~%" c)
(muffle-warning c))))
(let ((*readtable* *readtable*)
(*package* (find-package :cl-tty.input)))
(eval (read-from-string (coerce code 'string))))))))
;; Test the DEFMETHOD READ-EVENT section specifically (lines 321-327)
(test-subset "last-form" 321 327)