From 7d2c2d55e83325a5efb66af0a033b94583fca70e Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 1 Feb 2015 00:15:43 -0800 Subject: 690 - convention: '$' commands for debugging only Swap printing generalized objects using arc's infrastructure to be the $-prefixed debug helper, while the erstwhile $print-key-to-host becomes the primitive print-character to host. --- stdin.mu | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'stdin.mu') diff --git a/stdin.mu b/stdin.mu index 4ffded52..87598667 100644 --- a/stdin.mu +++ b/stdin.mu @@ -4,23 +4,22 @@ (function main [ (default-space:space-address <- new space:literal 30:literal) (cursor-mode) - (clear-screen) ; hook up stdin (stdin:channel-address <- init-channel 1:literal) -;? (print-primitive-to-host (("main: stdin is " literal))) -;? (print-primitive-to-host stdin:channel-address) -;? (print-primitive-to-host (("\n" literal))) +;? ($print (("main: stdin is " literal))) +;? ($print stdin:channel-address) +;? ($print (("\n" literal))) (fork-helper send-keys-to-stdin:fn nil:literal/globals nil:literal/limit nil:literal/keyboard stdin:channel-address) ; now read characters from stdin until a 'q' is typed - (print-primitive-to-host (("? " literal))) + ($print (("? " literal))) { begin (x:tagged-value stdin:channel-address/deref <- read stdin:channel-address) (c:character <- maybe-coerce x:tagged-value character:literal) -;? (print-primitive-to-host (("main: stdin is " literal))) -;? (print-primitive-to-host stdin:channel-address) -;? (print-primitive-to-host (("\n" literal))) -;? (print-primitive-to-host (("check: " literal))) -;? (print-primitive-to-host c:character) +;? ($print (("main: stdin is " literal))) +;? ($print stdin:channel-address) +;? ($print (("\n" literal))) +;? ($print (("check: " literal))) +;? ($print c:character) (done?:boolean <- equal c:character ((#\q literal))) (break-if done?:boolean) (loop) -- cgit 1.4.1-2-gfad0