about summary refs log tree commit diff stats
path: root/arc/stdin.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-27 16:01:55 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-27 17:47:59 -0700
commit6e1eeeebfb453fa7c871869c19375ce60fbd7413 (patch)
tree539c4a3fdf1756ae79770d5c4aaf6366f1d1525e /arc/stdin.mu
parent8846a7f85cc04b77b2fe8a67b6d317723437b00c (diff)
downloadmu-6e1eeeebfb453fa7c871869c19375ce60fbd7413.tar.gz
5485 - promote SubX to top-level
Diffstat (limited to 'arc/stdin.mu')
-rw-r--r--arc/stdin.mu27
1 files changed, 0 insertions, 27 deletions
diff --git a/arc/stdin.mu b/arc/stdin.mu
deleted file mode 100644
index 87598667..00000000
--- a/arc/stdin.mu
+++ /dev/null
@@ -1,27 +0,0 @@
-; reads and prints keys until you hit 'q'
-; no need to hit 'enter', and 'enter' has no special meaning
-; dies if you wait a while, because so far we never free memory
-(function main [
-  (default-space:space-address <- new space:literal 30:literal)
-  (cursor-mode)
-  ; hook up stdin
-  (stdin:channel-address <- init-channel 1: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 (("? " literal)))
-  { begin
-    (x:tagged-value stdin:channel-address/deref <- read stdin:channel-address)
-    (c:character <- maybe-coerce x:tagged-value character:literal)
-;?     ($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)
-  }
-])