From fb3bb6231462cddfb70301ea1672ebc04c8e829a Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 5 May 2011 11:36:37 +0000 Subject: more cleanups --- src/lisp/core.lisp.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/lisp') 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 -*- ;; -- cgit v1.2.3