Skip to content

Commit

Permalink
Make I/O char-based on CLisp
Browse files Browse the repository at this point in the history
  • Loading branch information
tizoc committed Mar 28, 2021
1 parent 70d16b3 commit 201875a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/overwrite.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,14 @@
(|shen-cl.read-eval| "(defmacro cl.exit-macro [cl.exit] -> [cl.exit 0])")
(|shen-cl.read-eval| "(defmacro shen-cl.exit-macro [shen-cl.exit] -> [cl.exit 0])")))

#+(or ccl sbcl)
#+(or ccl clisp sbcl)
(defun |shen.read-char-code| (s)
(let ((c (read-char s nil -1)))
(if (eq c -1)
-1
(char-int c))))

#+(or ccl sbcl)
#+(or ccl clisp sbcl)
(defun |pr| (x s)
(write-string x s)
(when (or (eq s |*stoutput*|) (eq s |*stinput*|))
Expand Down
8 changes: 2 additions & 6 deletions src/primitives.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,8 @@

#+clisp
(handler-bind ((warning #'muffle-warning))
(with-open-stream (*standard-input* (ext:make-stream :input :element-type 'unsigned-byte))
(with-open-stream (*standard-output* (ext:make-stream :output :element-type 'unsigned-byte))
(setq |*stoutput*| *standard-output*)
(setq |*stinput*| *standard-input*)
(let ((args (cons (car (coerce (ext:argv) 'list)) ext:*args*)))
(|shen-cl.toplevel-interpret-args| args)))))
(let ((args (cons (car (coerce (ext:argv) 'list)) ext:*args*)))
(|shen-cl.toplevel-interpret-args| args)))

#+ccl
(handler-bind ((warning #'muffle-warning))
Expand Down

0 comments on commit 201875a

Please sign in to comment.