diff options
author | dos-reis <gdr@axiomatics.org> | 2007-09-19 15:30:04 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-09-19 15:30:04 +0000 |
commit | 1d71a43cca77e1576cc1568298d5886a60c9b884 (patch) | |
tree | 270a5e091dc621fd0023f2261938cea235b0cbe9 /src/interp/nlib.lisp.pamphlet | |
parent | 1ee7a0030053e2447302d8157b9d3356a54e9b3a (diff) | |
download | open-axiom-1d71a43cca77e1576cc1568298d5886a60c9b884.tar.gz |
2007-09-19 Gabriel Dos Reis <gdr@cs.tamu.edu>
* Makefile.pamphlet (all-interpsys): Now depend on all-depsys.
src/interp/
2007-09-19 Gabriel Dos Reis <gdr@cs.tamu.edu>
* util.lisp.pamphlet ($directory-list): Move to sys-globals.boot.
($library-directory-list): Likewise.
* spad.lisp.pamphlet: Import "bootlex".
* preparse.lisp.pamphlet: Import "fnewmeta".
* postprop.lisp: Import "macros".
* postpar.boot.pamphlet: Import "postprop".
* nlib.lisp.pamphlet (rdefiostream): Define unconditionally.
(get-io-index-stream): Likewise.
(makedir): Likewise.
(get-directory-list): Don't use $current-diretory.
($filetype-table): Move to sys-constants.boot.
* patches.lisp.pamphlet ($current-directory): Remove.
(|cd|): Simplify implementation.
* newaux.lisp.pamphlet: Import "macros".
(|PARSE-NewKEY|): Define.
* metalex.lisp: Move various file, line, stack, character
utilities to here.
* macros.lisp.pamphlet (NREVERSE0): Move to sys-macros.lisp. Tidy.
* fnewmeta.lisp.pamphlet: Import "parsing".
* comp.lisp: Import "macros".
* def.lisp: Likewise.
(B-MDEF): Fix thinko.
* bootlex.lisp: Import "preparse", "def", and "nlib".
(BOOT-LINE-STACK): Move to metalex.lisp.
(NEXT-LINES-CLEAR): Likewise.
(NEXT-LINES-SHOW): Likewise.
(XCAPE): Likewise.
(KEYWORDS): Likewise.
* Makefile.pamphlet (${DEPSYS}): Now have all Lisp in compiled
form and load them.
* bookvol5.pamphlet ($current-directory): Remove.
Diffstat (limited to 'src/interp/nlib.lisp.pamphlet')
-rw-r--r-- | src/interp/nlib.lisp.pamphlet | 97 |
1 files changed, 14 insertions, 83 deletions
diff --git a/src/interp/nlib.lisp.pamphlet b/src/interp/nlib.lisp.pamphlet index 24f86ccd..e16a57b7 100644 --- a/src/interp/nlib.lisp.pamphlet +++ b/src/interp/nlib.lisp.pamphlet @@ -79,6 +79,7 @@ but has been changed to read: <<*>>= <<license>> +(IMPORT-MODULE "macros") (in-package "BOOT") #+:AKCL (defvar *lisp-bin-filetype* "o") @@ -101,10 +102,7 @@ but has been changed to read: :direction :output :if-exists :supersede)) optionlist))) -(defun directory? (filename) (boot::|directoryp| filename)) - ;; (RDEFIOSTREAM ((MODE . IO) (FILE fn ft dir))) IO is I,O,INPUT,OUTPUT -#+:AKCL (defun rdefiostream (options &optional (missing-file-error-flag t)) (let ((mode (cdr (assoc 'mode options))) (file (assoc 'file options)) @@ -127,7 +125,7 @@ but has been changed to read: ((equal (elt (string mode) 0) #\O) ;;(setq fullname (make-full-namestring (cdr file) 'LISPLIB)) (setq fullname (make-full-namestring (cdr file) 'NIL)) - (case (directory? fullname) + (case (|directoryp| fullname) (-1 (makedir fullname)) (0 (error (format nil "~s is an existing file, not a library" fullname))) (otherwise)) @@ -137,36 +135,6 @@ but has been changed to read: :indexstream stream )) ('t (ERROR "Unknown MODE"))))) -#+:CCL -(defun rdefiostream (options &optional (missing-file-error-flag t)) - (let ((mode (cdr (assoc 'mode options))) - (file (assoc 'file options)) - (stream nil) - (fullname nil) - (indextable nil)) - (cond ((equal (elt (string mode) 0) #\I) - (setq fullname (make-input-filename (cdr file) NIL)) - (setq stream (get-input-index-stream fullname)) - (if (null stream) - (if missing-file-error-flag - (ERROR (format nil "Library ~s doesn't exist" - (make-filename (cdr file) NIL))) - NIL) - (make-libstream :mode 'input :dirname fullname - :indextable (get-index-table-from-stream stream) - :indexstream stream))) - ((equal (elt (string mode) 0) #\O) - (setq fullname (make-full-namestring (cdr file) NIL)) - (create-directory fullname) - (multiple-value-setq (stream indextable) - (get-io-index-stream fullname)) - (make-libstream :mode 'output :dirname fullname - :indextable indextable - :indexstream stream )) - ('t (ERROR "Unknown MODE"))))) - -#+:AKCL (defvar *index-filename* "index.KAF") -#+:CCL (defvar *index-filename* "index.KAF") ;get the index table of the lisplib in dirname (defun getindextable (dirname) @@ -188,7 +156,6 @@ but has been changed to read: (read stream)) (t pos)))) -#+:AKCL (defun get-io-index-stream (dirname) (let* ((index-file (concat dirname "/" *index-filename*)) (stream (open index-file :direction :io :if-exists :overwrite @@ -204,24 +171,6 @@ but has been changed to read: (setq indextable pos))) (values stream indextable))) -#+:CCL -(defun get-io-index-stream (dirname) - (let ((index-file (concat dirname "/" *index-filename*)) - (indextable ()) - (stream) (pos)) - (cond ((probe-file index-file) - (setq stream (open index-file :direction :io :if-exists :overwrite)) - (setq pos (read stream)) - (file-position stream pos) - (setq indextable (read stream)) - (file-position stream pos)) - (t (setq stream (open index-file :direction :io - :if-does-not-exist :create)) - ;(file-position stream 0) - (princ " " stream))) - (values stream indextable))) - - ;substitute indextable in dirname (defun write-indextable (indextable stream) @@ -248,10 +197,11 @@ but has been changed to read: (file-position stream :end) (write-indextable indextable stream))) -;makedir (fname) fname is a directory name. -#+:AKCL +;; makedir (fname) fname is a directory name. (defun makedir (fname) - (system (concat "mkdir " fname))) + #+ (and (not :GCL) :COMMON-LISP) (ensure-directories-exist fname) + #+ :GCL (system (concat "mkdir " fname)) + ) ;; (RREAD key rstream) (defun rread (key rstream &optional (error-val nil error-val-p)) @@ -366,14 +316,14 @@ but has been changed to read: (if (or (not mdate) (datelessp mdate ldate)) (seq (if (null output-library) - (boot::|openOutputLibrary| - (setq boot::|$outputLibraryName| - (if (null boot::|$outputLibraryName|) + (|openOutputLibrary| + (setq |$outputLibraryName| + (if (null |$outputLibraryName|) (make-pathname :directory (get-current-directory) :name "user.lib") - (if (filep boot::|$outputLibraryName|) - (truename boot::|$outputLibraryName|) - boot::|$outputLibraryName|))))) + (if (filep |$outputLibraryName|) + (truename |$outputLibraryName|) + |$outputLibraryName|))))) (compile-file lfile :output-file (intern (pathname-name (directory-namestring lfile)))))))) @@ -444,10 +394,9 @@ but has been changed to read: (defun probe-name (file) (if (probe-file file) (namestring file) nil)) -(defun get-directory-list (ft &aux (cd (namestring $current-directory))) - (declare (special $current-directory)) +(defun get-directory-list (ft &aux (cd (namestring (get-current-directory)))) (cond ((member ft '("NRLIB" "DAASE" "EXPOSED") :test #'string=) - (if (eq BOOT::|$UserLevel| 'BOOT::|development|) + (if (eq |$UserLevel| '|development|) (cons cd $library-directory-list) $library-directory-list)) (t (adjoin cd @@ -511,24 +460,6 @@ but has been changed to read: (system (concat "cp " namestring1 " " namestring2))) -(defvar $filetype-table - '((BOOT::LISPLIB . |LILIB|) - (BOOT::SPADLIB . |slib|) - (BOOT::HISTORY . |hist|) - (BOOT::HELPSPAD . |help|) - (BOOT::INPUT . |input|) - (BOOT::SPAD . |spad|) - (BOOT::BOOT . |boot|) - (BOOT::LISP . |lsp|) - (BOOT::META . |meta|) - (BOOT::OUTPUT . |splog|) - (BOOT::ERRORLIB . |erlib|) - (BOOT::DATABASE . |DAASE|) - (BOOT::SPADDATA . |sdata|) - (BOOT::SPADFORT . |sfort|) - (BOOT::SPADFORM . |sform|) - (BOOT::SPADTEX . |stex|) - (BOOT::SPADOUT . |spout|))) @ \eject \begin{thebibliography}{99} |