diff options
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 ba19d87f..d9bce925 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -98,10 +98,12 @@ "outputTextFile" "closeFile" "closeStream" + "eof?" "prettyPrint" "readLine" "readExpr" "readIntegerIfCan" + "formatToString" ;; compiler data structures "%Mode" @@ -138,6 +140,7 @@ "makeByteArray" "makeBitVector" "makeString" + "listToString" "%hasFeature" "%systemOptions" @@ -525,6 +528,9 @@ (defmacro |closeStream| (s) `(close ,s)) +(defmacro |eof?| (s) + `(null (peek-char nil ,s nil nil nil))) + ;; Read a line from the input text file. Quietly return ;; %nothing at end of file. (defmacro |readLine| (f) @@ -550,6 +556,9 @@ (*print-level* nil)) (prin1 x s))) +(defmacro |formatToString| (&rest args) + `(format nil ,@args)) + ;; ;; -*- OpenAxiom filesystem -*- ;; @@ -1373,6 +1382,14 @@ (defun |makeString| (n &optional (c (code-char 0))) (make-string n :initial-element c)) +(defun |listToString| (l) + (let ((s (|makeString| (list-length l)))) + (do ((i 0 (1+ i))) + (null l) + (setf (schar s i) (car l)) + (setq l (cdr l))) + s)) + ;; native data type translation table (defconstant |$NativeTypeTable| '((|void| . @void_type@) |