Welcome to the CHICKEN Scheme pasting service

no stty added by mario-goulart on Thu Sep 29 19:29:38 2011

$ git diff
diff --git a/chicken-select.scm b/chicken-select.scm
old mode 100644
new mode 100755
index 1b4beec..8b6b3d4
--- a/chicken-select.scm
+++ b/chicken-select.scm
@@ -1,6 +1,6 @@
 #!/usr/bin/csi -s
 
-(use srfi-1 posix stty)
+(use srfi-1 posix)
 (include "chicken-env")
 
 (assert-chicken-coop-exists)
@@ -57,16 +57,18 @@
                     all-chicks
                     (iota (length all-chicks)))
           (newline)
-          (print "Select a new Chicken, press ENTER to abort:")
-          (let* ((choice-raw (with-stty '(cbreak (not echo)) read-char))
-                 (num (string->number (string choice-raw))))
-            (if (and 
-                 num
-                 (<= 0 num)
-                 (< num (length all-chicks)))
-                (begin
-                  (print "Setting current Chicken to " (list-ref all-chicks num))
-                  (set-current-chicken (list-ref all-chicks
-                                                 num)
-                                       chicken-link))
-                (select choice-raw)))))))
\ No newline at end of file
+          (print* "Select a new Chicken, press ENTER to abort: ")
+          (let ((choice-raw (read-line)))
+            (if (equal? choice-raw "")
+                (exit)
+                (let ((num (string->number choice-raw)))
+                  (if (and
+                       num
+                       (<= 0 num)
+                       (< num (length all-chicks)))
+                      (begin
+                        (print "Setting current Chicken to " (list-ref all-chicks num))
+                        (set-current-chicken (list-ref all-chicks
+                                                       num)
+                                             chicken-link))
+                      (select choice-raw)))))))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What module provides regular expressions support?
Visually impaired? Let me spell it for you (wav file) download WAV