From d4b55b57874770ebaf0bd0f79b91ff40a6d94b94 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 28 May 2011 07:00:13 +0000 Subject: * lisp/core.lisp.in: Define and export readLine and readbyte. * interp/sys-utility.boot (readByteFromFile): Remove. * boot/tokens.boot: Don't rename readLine and readByte. * boot/includer.boot (shoeReadLine): Remove. (bRgen1): Adjust. Use resdLine. * algebra/net.spad.pamphlet (InputBinaryFile): Use readByte from the runtime system. --- src/lisp/core.lisp.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/lisp') diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index f533a4a8..a46e14b4 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -99,6 +99,7 @@ "outputTextFile" "closeFile" "prettyPrint" + "readLine" ;; compiler data structures "%Mode" @@ -141,6 +142,7 @@ "%systemArguments" "%basicSystemIsComplete" "%algebraSystemIsComplete" + "%nothing" "$hostPlatform" "$buildPlatform" @@ -419,6 +421,10 @@ (defconstant |$EditorProgram| "@oa_editor@") +;; Token expression to indicate absence of value or bottom value. +;; This is also the bottom value of the Maybe domain. +(defconstant |%nothing| :|OpenAxiomNoValue|) + ;; Base name of the native core runtime library (defconstant |$CoreLibName| "open-axiom-core") @@ -499,6 +505,13 @@ (defun |closeFile| (f) (close f)) +;; Read a line from the input text file. Quietly return +;; %nothing at end of file. +(defmacro |readLine| (f) + `(read-line ,f nil |%nothing|)) + +(defmacro |readByte| (f) + `(read-byte ,f nil |%nothing|)) ;; Pretty-print a lisp form on a given output stream. (defun |prettyPrint| (x &optional (s |$OutputStream|)) -- cgit v1.2.3