diff options
author | dos-reis <gdr@axiomatics.org> | 2011-04-30 14:27:31 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-04-30 14:27:31 +0000 |
commit | bd5f5b0df93361d31592738fb18d77a275f04bc9 (patch) | |
tree | e2b46b5d5ded0265990ef24f4bf2ddb9640e7fc4 /src/lisp | |
parent | 6661a9aa8e79dc934bde807293857f2dfc0eca6f (diff) | |
download | open-axiom-bd5f5b0df93361d31592738fb18d77a275f04bc9.tar.gz |
more cleanup
Diffstat (limited to 'src/lisp')
-rw-r--r-- | src/lisp/core.lisp.in | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 3f34b9f8..a083b108 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -84,6 +84,9 @@ ;; IO "inputBinaryFile" "outputBinaryFile" + "inputTextFile" + "outputTextFile" + "closeFile" ;; compiler data structures "%Mode" @@ -118,6 +121,7 @@ "%ByteArray" "makeByteArray" + "makeString" "%hasFeature" "%systemOptions" @@ -215,12 +219,10 @@ (deftype |%Maybe| (s) `(or null ,s)) (deftype |%Pair| (u v) - (declare (ignore u v)) - 'cons) + `(cons ,u ,v)) (deftype |%List| (s) - (declare (ignore s)) - 'list) + `(or null (cons ,s))) (deftype |%SimpleArray| (s) `(simple-array ,s)) @@ -439,13 +441,30 @@ ;; -*- File IO -*- (defun |inputBinaryFile| (f) - (open f :direction :input :element-type 'unsigned-byte + (open f + :direction :input + :element-type 'unsigned-byte :if-does-not-exist nil)) (defun |outputBinaryFile| (f) - (open f :direction :output :element-type 'unsigned-byte + (open f + :direction :output + :element-type 'unsigned-byte :if-exists :supersede)) +(defun |inputTextFile| (f) + (open f + :direction :input + :if-does-not-exist nil)) + +(defun |outputTextFile| (f) + (open f + :direction :output + :if-exists :supersede)) + +(defun |closeFile| (f) + (close f)) + ;; ;; -*- OpenAxiom filesystem -*- ;; @@ -1248,6 +1267,9 @@ :element-type '(unsigned-byte 8) :initial-element 0)) +(defun |makeString| (n &optional (c (code-char 0))) + (make-string n :initial-element c)) + ;; native data type translation table (defconstant |$NativeTypeTable| '((|void| . @void_type@) |