diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-02-01 00:15:43 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-02-01 00:15:43 -0800 |
commit | 7d2c2d55e83325a5efb66af0a033b94583fca70e (patch) | |
tree | 0bade19ad9230f2aa6076440548b50456c9f6fd8 /stdin.mu | |
parent | 48a74397fb1a967fffa67ffb80005d94ed2ac60c (diff) | |
download | mu-7d2c2d55e83325a5efb66af0a033b94583fca70e.tar.gz |
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.
Diffstat (limited to 'stdin.mu')
-rw-r--r-- | stdin.mu | 19 |
1 files changed, 9 insertions, 10 deletions
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) |