diff options
author | dos-reis <gdr@axiomatics.org> | 2008-03-17 09:00:41 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-03-17 09:00:41 +0000 |
commit | 0f8d3e4c660cc6177e57b21579ac40733b82b940 (patch) | |
tree | 815ca8b520f594bcbbe2fd4c23a30b1e4e1c9f92 /src/interp/nlib.lisp | |
parent | d9b9f67266bcb24e7bec1a26afaf062b376d450e (diff) | |
download | open-axiom-0f8d3e4c660cc6177e57b21579ac40733b82b940.tar.gz |
* lib/cfuns-c.c (oa_chdir): Define.
(is_dot_or_dotdot): New.
(oa_unlink): Define.
(oa_rename): Likewise.
(oa_mkdir): Likewise.
* interp/sys-os.boot: New file.
* interp/util.lisp (MAKE-TAGS-FILE): Use changeDirectory.
(MAKELIB): Likewise.
(MAKESPAD): Likewise.
(LIBCHECK): Likewise.
* interp/sys-utility.boot ($ERASE): Define here. Use removeFile.
($REPLACE): Likewise.
(checkMkdir): Define.
* interp/obey.lisp (MAKEDIR): Remove definition.
* interp/nlib.lisp (RDEFIOSTREAM): Use checkMkdir.
(MAKEDIR): Remove.
(RPACKFILE): Use removeFile.
($ERASE): Remove Lisp definition.
($REPLACE): Likewise.
* interp/i-syscmd.boot (cd): Use changeDirectory.
(compileAsharpArchiveCmd): Use mkdir.
(histFileErase): Likewise.
* interp/fortcall.boot (fortCall): Use removeFile.
(invokeNagman): Likewise.
* interp/daase.lisp (|library|): Use changeDirectory.
(LOCALDATABASE): Likewise.
(DaaseName): Use removeFile.
* interp/construc.lisp (mergelibs): Use removeFile.
(mergeall): Use changeDirectory.
* interp/c-doc.boot (docreport): Use removeFile.
* interp/br-search.boot (getTempPath): Likewise.
* interp/br-saturn.boot (dbSort): Likewise.
* interp/br-data.boot (buildLibdb): Likewise
(dbSplitLibdb): Likewise.
(buildGloss): Likewise.
(purgeLocalLibdb): Likewise.
* interp/as.boot (asList): Likewise.
* interp/Makefile.pamphlet (OBJS): Include sys-os.$(FASLEXT).
(sys-os.$(FASLEXT)): New rule.
(sys-utility.$(FASLEXT)): Require sys-os.$(FASLEXT).
* include/cfuns.h (oa_chdir): Declare.
(oa_unlink): Likewise.
(oa_rename): Likewise.
(oad_mkdir): Likewise.
Diffstat (limited to 'src/interp/nlib.lisp')
-rw-r--r-- | src/interp/nlib.lisp | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/src/interp/nlib.lisp b/src/interp/nlib.lisp index 2d070775..fa788f2a 100644 --- a/src/interp/nlib.lisp +++ b/src/interp/nlib.lisp @@ -1,6 +1,6 @@ -;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. +;; Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. ;; All rights reserved. -;; Copyright (C) 2007, Gabriel Dos Reis. +;; Copyright (C) 2007-2008, Gabriel Dos Reis. ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without @@ -15,7 +15,7 @@ ;; the documentation and/or other materials provided with the ;; distribution. ;; -;; - Neither the name of The Numerical ALgorithms Group Ltd. nor the +;; - Neither the name of The Numerical Algorithms Group Ltd. nor the ;; names of its contributors may be used to endorse or promote products ;; derived from this software without specific prior written permission. ;; @@ -79,7 +79,7 @@ ;;(setq fullname (make-full-namestring (cdr file) 'LISPLIB)) (setq fullname (make-full-namestring (cdr file) 'NIL)) (case (|directoryp| fullname) - (-1 (makedir fullname)) + (-1 (|checkMkdir| fullname)) (0 (error (format nil "~s is an existing file, not a library" fullname))) (otherwise)) (multiple-value-setq (stream indextable) (get-io-index-stream fullname)) @@ -150,12 +150,6 @@ (file-position stream :end) (write-indextable indextable stream))) -;; makedir (fname) fname is a directory name. -(defun makedir (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)) (if (equal (libstream-mode rstream) 'output) (error "not input stream")) @@ -249,9 +243,9 @@ (o (make-pathname :type "o"))) (si::system (format nil "cp ~S ~S" code temp)) (recompile-lib-file-if-necessary temp) - (si::system (format nil "mv ~S ~S~%" + (|renameFile| (namestring (merge-pathnames o temp)) - (namestring (merge-pathnames o code))))) + (namestring (merge-pathnames o code)))) ;; only pack non libraries to avoid lucid file handling problems (let* ((rstream (rdefiostream (list (cons 'file filespec) (cons 'mode 'input)))) (nstream nil) @@ -406,16 +400,6 @@ (some #'(lambda (ft) (make-input-filename file-name ft)) filetypelist))) -;; ($ERASE filearg) -> 0 if succeeds else 1 -(defun $erase (&rest filearg) - (system (concat "rm -rf "(make-full-namestring filearg)))) - -(defun $REPLACE (filespec1 filespec2) - ($erase (setq filespec1 (make-full-namestring filespec1))) - (rename-file (make-full-namestring filespec2) filespec1)) - - - ;;(defun move-file (namestring1 namestring2) ;; (rename-file namestring1 namestring2)) @@ -429,7 +413,7 @@ #+(OR :AKCL (AND :CCL :UNIX)) (defun copy-lib-directory (name1 name2) - (makedir name2) + (|checkMkdir| name2) (system (concat "sh -c 'cp " name1 "/* " name2 "'"))) #+(OR :AKCL (AND :CCL :UNIX)) |