Skip to content
Snippets Groups Projects
Commit 8c81c238 authored by ram's avatar ram
Browse files

Changed query-readline to be a function & to force output.

parent 8bd26ade
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/query.lisp,v 1.3 1991/02/14 19:03:24 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/query.lisp,v 1.4 1993/12/28 16:54:01 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -25,9 +25,10 @@ ...@@ -25,9 +25,10 @@
(export '(y-or-n-p yes-or-no-p)) (export '(y-or-n-p yes-or-no-p))
(eval-when (compile) (defun query-readline ()
(defmacro query-readline () (force-output *query-io*)
`(string-trim " " (read-line *query-io*)))) (string-trim " " (read-line *query-io*)))
;;; Y-OR-N-P -- Public. ;;; Y-OR-N-P -- Public.
;;; ;;;
...@@ -38,8 +39,7 @@ ...@@ -38,8 +39,7 @@
enter any other characters." enter any other characters."
(when format-string (when format-string
(fresh-line *query-io*) (fresh-line *query-io*)
(apply #'format *query-io* format-string arguments) (apply #'format *query-io* format-string arguments))
(force-output *query-io*))
(loop (loop
(let* ((line (query-readline)) (let* ((line (query-readline))
(ans (if (string= line "") (ans (if (string= line "")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment