aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog4
-rw-r--r--src/interp/nlib.lisp14
-rw-r--r--src/interp/sys-utility.boot11
3 files changed, 16 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e78b0575..ea72ec70 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2013-05-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
+ * interp/nlib.lisp (GET-DIRECTORY-LIST): Move to sys-utility.boot.
+
+2013-05-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
* interp/lisplib.boot: Replace $FILEP with makeFullFilePath.
* interp/setvars.boot: Likewise.
* interp/nlib.lisp ($FILEP): Remove.
diff --git a/src/interp/nlib.lisp b/src/interp/nlib.lisp
index 770c6ada..8a9a2e99 100644
--- a/src/interp/nlib.lisp
+++ b/src/interp/nlib.lisp
@@ -241,24 +241,12 @@
(putindextable ctable filearg))
-(defun get-directory-list (ft)
- (let ((cd (|getWorkingDirectory|)))
- (cond ((member ft '("NRLIB" "DAASE" "EXPOSED") :test #'string=)
- (if (eq |$UserLevel| '|development|)
- (cons cd $library-directory-list)
- $library-directory-list))
- (t (adjoin cd
- (adjoin (namestring (|userHomeDirectory|))
- $directory-list
- :test #'string=)
- :test #'string=)))))
-
(defun make-input-filename (filearg &optional (filetype nil))
(let*
((filename (|makeFilename| filearg filetype))
(dirname (pathname-directory filename))
(ft (pathname-type filename))
- (dirs (get-directory-list ft))
+ (dirs (|getDirectoryList| ft))
(newfn nil))
(if (or (null dirname) (eqcar dirname :relative))
(dolist (dir dirs (|probeReadableFile| filename))
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot
index 164b435e..a29779e9 100644
--- a/src/interp/sys-utility.boot
+++ b/src/interp/sys-utility.boot
@@ -449,3 +449,14 @@ makeFilename(filearg,filetype==nil) ==
makeFullFilePath(filearg,filetype==nil) ==
filePathString mergeFilePaths makeFilename(filearg,filetype)
+getDirectoryList ft ==
+ here := getWorkingDirectory()
+ ft in '("NRLIB" "DAASE" "EXPOSED") =>
+ $UserLevel = 'development => [here,:$LIBRARY_-DIRECTORY_-LIST]
+ $LIBRARY_-DIRECTORY_-LIST
+ home := filePathString userHomeDirectory()
+ dirs :=
+ stringMember?(home,$DIRECTORY_-LIST) => $DIRECTORY_-LIST
+ [home,:$DIRECTORY_-LIST]
+ stringMember?(here,dirs) => dirs
+ [here,:dirs]