mirror of
https://github.com/kanaka/mal.git
synced 2024-11-10 12:47:45 +03:00
Common Lisp: Initialize standard streams in GNU CLISP on startup
Without the initialization CLISP seems to be interacting wierdly with PERL_RL flag
This commit is contained in:
parent
e7e61f3274
commit
89676a9fba
@ -39,7 +39,20 @@
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
(declare (ignorable argv argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(loop do (let ((line (mal-readline "user> ")))
|
||||
(if line (mal-writeline (rep line)) (return)))))
|
||||
|
@ -47,7 +47,20 @@
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
(declare (ignorable argv argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(loop do (let ((line (mal-readline "user> ")))
|
||||
(if line (mal-writeline (rep line)) (return)))))
|
||||
|
@ -110,7 +110,20 @@
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
(declare (ignorable argv argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(loop do (let ((line (mal-readline "user> ")))
|
||||
(if line (mal-writeline (rep line)) (return)))))
|
||||
|
@ -139,7 +139,20 @@
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
(declare (ignorable argv argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(loop do (let ((line (mal-readline "user> ")))
|
||||
(if line (mal-writeline (rep line)) (return)))))
|
||||
|
@ -142,7 +142,20 @@
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
(declare (ignorable argv argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(loop do (let ((line (mal-readline "user> ")))
|
||||
(if line (mal-writeline (rep line)) (return)))))
|
||||
|
@ -153,7 +153,20 @@
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
(declare (ignorable argv argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(loop do (let ((line (mal-readline "user> ")))
|
||||
(if line (mal-writeline (rep line)) (return)))))
|
||||
|
@ -168,9 +168,21 @@
|
||||
(rep (format nil "(load-file \"~a\")" file)))
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(let ((args (if argv-provided-p
|
||||
argv
|
||||
(cdr (utils:raw-command-line-arguments)))))
|
||||
|
@ -204,9 +204,21 @@
|
||||
(rep (format nil "(load-file \"~a\")" file)))
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(let ((args (if argv-provided-p
|
||||
argv
|
||||
(cdr (utils:raw-command-line-arguments)))))
|
||||
|
@ -263,9 +263,21 @@
|
||||
(rep (format nil "(load-file \"~a\")" file)))
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(let ((args (if argv-provided-p
|
||||
argv
|
||||
(cdr (utils:raw-command-line-arguments)))))
|
||||
|
@ -291,9 +291,21 @@
|
||||
(rep (format nil "(load-file \"~a\")" file)))
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(let ((args (if argv-provided-p
|
||||
argv
|
||||
(cdr (utils:raw-command-line-arguments)))))
|
||||
|
@ -303,8 +303,21 @@
|
||||
(rep (format nil "(load-file \"~a\")" file)))
|
||||
|
||||
(defun main (&optional (argv nil argv-provided-p))
|
||||
|
||||
(setf *use-readline-p* (not (or (string= (uiop:getenv "PERL_RL") "false")
|
||||
(string= (uiop:getenv "TERM") "dumb"))))
|
||||
|
||||
;; In GNU CLISP's batch mode the standard-input seems to be set to some sort
|
||||
;; of input string-stream, this interacts wierdly with the PERL_RL enviroment
|
||||
;; variable which the test runner sets causing `read-line' on *standard-input*
|
||||
;; to fail with an empty stream error. The following reinitializes the
|
||||
;; standard streams
|
||||
;;
|
||||
;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html
|
||||
#+clisp (setf *standard-input* (ext:make-stream :input)
|
||||
*standard-output* (ext:make-stream :output :buffered t)
|
||||
*error-output* (ext:make-stream :error :buffered t))
|
||||
|
||||
(let ((args (if argv-provided-p
|
||||
argv
|
||||
(cdr (utils:raw-command-line-arguments)))))
|
||||
|
Loading…
Reference in New Issue
Block a user