aboutsummaryrefslogtreecommitdiff
path: root/src/lisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-05-28 07:00:13 +0000
committerdos-reis <gdr@axiomatics.org>2011-05-28 07:00:13 +0000
commitd4b55b57874770ebaf0bd0f79b91ff40a6d94b94 (patch)
tree1353d1fa1ca5adc163fa61ad8ce94018396a17be /src/lisp
parent414db62082f6e113d0898240887f53fc43d21ae7 (diff)
downloadopen-axiom-d4b55b57874770ebaf0bd0f79b91ff40a6d94b94.tar.gz
* 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.
Diffstat (limited to 'src/lisp')
-rw-r--r--src/lisp/core.lisp.in13
1 files changed, 13 insertions, 0 deletions
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|))