match existing eof behavior

This commit is contained in:
~d6 2025-01-20 20:23:22 -05:00
parent 5f30e61907
commit 4022553dc0
1 changed files with 2 additions and 2 deletions

4
vm.scm
View File

@ -320,7 +320,7 @@
; - 1 stdin ; - 1 stdin
; - 2 argument data ; - 2 argument data
; - 3 spacer between arguments ; - 3 spacer between arguments
; - 4 spacer after arguments ; - 4 spacer after arguments, or end of stdin
(define (u:send-input c type) (define (u:send-input c type)
(let* ((hi (vector-ref dev 16)) (let* ((hi (vector-ref dev 16))
(lo (vector-ref dev 17)) (lo (vector-ref dev 17))
@ -334,7 +334,7 @@
(define (u:read-stdin port) (define (u:read-stdin port)
(let ((c (read-char port))) (let ((c (read-char port)))
(if (eof-object? c) (if (eof-object? c)
(u:send-input #\newline 4) (u:send-input #\null 4)
(begin (begin
(u:send-input c 1) (u:send-input c 1)
(u:read-stdin port))))) (u:read-stdin port)))))