diff options
author | dos-reis <gdr@axiomatics.org> | 2011-05-05 11:36:37 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-05-05 11:36:37 +0000 |
commit | fb3bb6231462cddfb70301ea1672ebc04c8e829a (patch) | |
tree | 316e516bc5f0920f407fdae6e54780cdbdd320f2 /src/lisp | |
parent | 94c6cd6e946964b3710dbe24dbca7c44a36beee0 (diff) | |
download | open-axiom-fb3bb6231462cddfb70301ea1672ebc04c8e829a.tar.gz |
more cleanups
Diffstat (limited to 'src/lisp')
-rw-r--r-- | src/lisp/core.lisp.in | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 164b13e6..d4bf2df8 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -83,11 +83,16 @@ "%SimpleArray" ;; IO + "$InputStream" + "$OutputStream" + "$ErrorStream" + "inputBinaryFile" "outputBinaryFile" "inputTextFile" "outputTextFile" "closeFile" + "prettyPrint" ;; compiler data structures "%Mode" @@ -444,6 +449,11 @@ (t -1)))) ;; -*- File IO -*- + +(defparameter |$InputStream| (make-synonym-stream '*standard-input*)) +(defparameter |$OutputStream| (make-synonym-stream '*standard-output*)) +(defparameter |$ErrorStream| (make-synonym-stream '*standard-output*)) + (defun |inputBinaryFile| (f) (open f :direction :input @@ -469,6 +479,13 @@ (defun |closeFile| (f) (close f)) + +;; Pretty-print a lisp form on a given output stream. +(defun |prettyPrint| (x &optional (s |$OutputStream|)) + (let ((*print-pretty* t) + (*print-array* t)) + (prin1 x s))) + ;; ;; -*- OpenAxiom filesystem -*- ;; |