aboutsummaryrefslogtreecommitdiff
path: root/src/lisp/core.lisp.in
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-10-05 12:38:09 +0000
committerdos-reis <gdr@axiomatics.org>2011-10-05 12:38:09 +0000
commitda334a99fa9e66215133f4cf5fe87a3b78d7084e (patch)
tree27af1107fd5d2ce3366260aa93f66a1531bdd342 /src/lisp/core.lisp.in
parent90abde087099b60884295a2d61f2950836890c81 (diff)
downloadopen-axiom-da334a99fa9e66215133f4cf5fe87a3b78d7084e.tar.gz
* lisp/core.lisp.in (eof?): New.
(listToString): Likewise. (formatToString): Likewise. * boot/tokens.boot: Add fifth as builtin library function.
Diffstat (limited to 'src/lisp/core.lisp.in')
-rw-r--r--src/lisp/core.lisp.in17
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@)