- checking for possible false task:pre-match

This commit is contained in:
frese 2004-09-20 01:32:55 +00:00
parent 96fccbe6b0
commit fef087fbab
1 changed files with 6 additions and 11 deletions

View File

@ -32,11 +32,13 @@ exec scsh -lel expect/load.scm -o threads -o tty-utils -o expect -o let-opt -e m
(chat-monitor (lambda (ev msg) (chat-monitor (lambda (ev msg)
(cond (cond
((eq? ev 'abort) ((eq? ev 'abort)
(write-string (task:pre-match task) user-out) (if (task:pre-match task)
(write-string msg user-out) (write-string (task:pre-match task) user-out))
(write-string (match:substring msg) user-out)
(write-string (task:buf task) user-out)) (write-string (task:buf task) user-out))
((eq? ev 'timeout) ((eq? ev 'timeout)
(write-string (task:pre-match task) user-out) (if (task:pre-match task)
(write-string (task:pre-match task) user-out))
(write-string (task:buf task) user-out))))) (write-string (task:buf task) user-out)))))
(chat-abort *prompt-regexp*) (chat-abort *prompt-regexp*)
@ -54,14 +56,7 @@ exec scsh -lel expect/load.scm -o threads -o tty-utils -o expect -o let-opt -e m
(tsend/cr task (string-append "cd " dir)) (tsend/cr task (string-append "cd " dir))
;;(let ((tty-before (tty-info user-in))) (interact task)))
;; (modify-tty (lambda (ti) (raw (echo-off ti))) user-in)
;; raw-initialize needed??
(interact task)
;;(set-tty-info/now user-in tty-before))
))
;; read string without echoing it ;; read string without echoing it
;; optionals arguments: ;; optionals arguments: