summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-12 02:33:05 +0100
committerhut <hut@lavabit.com>2010-03-12 02:33:09 +0100
commit0d15a7cb155df52bfde44b13407d565738d20898 (patch)
tree098f6b695965bdb8ae7d22159e986a6860360c2c /ranger.py
parentf793be4b7caaa06a6362ae2ada3e1a0a00292400 (diff)
downloadranger-0d15a7cb155df52bfde44b13407d565738d20898.tar.gz
make push: removed "hut" repo
Diffstat (limited to 'ranger.py')
0 files changed, 0 insertions, 0 deletions
lame/stdin.mu?h=hlt&id=009593c7c6463ec3d4873231da5231fa16d424e2'>^
97dd2c65 ^
7d2c2d55 ^
337a099d ^
5b698455 ^
337a099d ^
7d2c2d55 ^




337a099d ^

337a099d ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27


                                                               

                                                               
               

                                                   


                                           
                                                                                                                      
                                                       
                           
         
                                                                              
                                                                  




                                             

                                                        


          
; 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)
  }
])