From nsiivola at common-lisp.net Fri Mar 5 18:34:55 2004 From: nsiivola at common-lisp.net (Nikodemus Siivola) Date: Fri, 05 Mar 2004 13:34:55 -0500 Subject: [osicat-cvs] CVS update: src/grovel-constants.lisp src/osicat.asd src/version.txt Message-ID: Update of /project/osicat/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv23136 Modified Files: grovel-constants.lisp osicat.asd version.txt Log Message: Fixed *print-case* dependency Date: Fri Mar 5 13:34:54 2004 Author: nsiivola Index: src/grovel-constants.lisp diff -u src/grovel-constants.lisp:1.3 src/grovel-constants.lisp:1.4 --- src/grovel-constants.lisp:1.3 Sun Feb 29 06:29:14 2004 +++ src/grovel-constants.lisp Fri Mar 5 13:34:54 2004 @@ -29,7 +29,8 @@ (defun write-groveler (file constants) (with-open-file (f file :direction :output :if-exists :supersede) - (format f " + (let ((*print-case* :upcase)) + (format f " #include #include @@ -50,7 +51,7 @@ (format f " return 0; } -"))) +")))) (unless (boundp '*grovel*) (error "No GROVEL hook!")) Index: src/osicat.asd diff -u src/osicat.asd:1.6 src/osicat.asd:1.7 --- src/osicat.asd:1.6 Sun Feb 29 15:29:35 2004 +++ src/osicat.asd Fri Mar 5 13:34:54 2004 @@ -69,6 +69,7 @@ ;;;; SYSTEM (defsystem :osicat + :version "0.3.6" :depends-on (:uffi) :components ((:c-source-file "osicat-glue") Index: src/version.txt diff -u src/version.txt:1.8 src/version.txt:1.9 --- src/version.txt:1.8 Sun Feb 29 18:52:23 2004 +++ src/version.txt Fri Mar 5 13:34:54 2004 @@ -1 +1 @@ -0.3.5 +0.3.6 From nsiivola at common-lisp.net Fri Mar 5 19:15:15 2004 From: nsiivola at common-lisp.net (Nikodemus Siivola) Date: Fri, 05 Mar 2004 14:15:15 -0500 Subject: [osicat-cvs] CVS update: src/Makefile Message-ID: Update of /project/osicat/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv28608 Modified Files: Makefile Log Message: Added generation of README Date: Fri Mar 5 14:15:15 2004 Author: nsiivola Index: src/Makefile diff -u src/Makefile:1.3 src/Makefile:1.4 --- src/Makefile:1.3 Sun Oct 26 09:38:02 2003 +++ src/Makefile Fri Mar 5 14:15:15 2004 @@ -64,6 +64,7 @@ # $(RSYNC_FTP) && $(FTP_PERMS) release: + sbcl --noinform --userinit /dev/null --load make-readme.lisp --eval '(quit)' mkdir -p $(NAME) cp $(FILES) $(NAME)/ tar -czvf $(NAME).tar.gz $(NAME) From nsiivola at common-lisp.net Mon Mar 8 06:41:32 2004 From: nsiivola at common-lisp.net (Nikodemus Siivola) Date: Mon, 08 Mar 2004 01:41:32 -0500 Subject: [osicat-cvs] CVS update: src/osicat.lisp src/packages.lisp Message-ID: Update of /project/osicat/cvsroot/src In directory common-lisp.net:/tmp/cvs-serv19603 Modified Files: osicat.lisp packages.lisp Log Message: Shadow directory Date: Mon Mar 8 01:41:32 2004 Author: nsiivola Index: src/osicat.lisp diff -u src/osicat.lisp:1.16 src/osicat.lisp:1.17 --- src/osicat.lisp:1.16 Sun Feb 29 18:41:50 2004 +++ src/osicat.lisp Mon Mar 8 01:41:32 2004 @@ -71,17 +71,25 @@ (defun relative-pathname-p (pathspec) (not (eq :absolute (car (pathname-directory pathspec))))) -(defun absolute-pathname - (pathspec &optional (default *default-pathname-defaults*)) - (if (relative-pathname-p pathspec) - (let ((tmp (merge-pathnames - pathspec - (make-pathname :name nil :type nil :version nil - :defaults default)))) - (if (relative-pathname-p tmp) - (merge-pathnames tmp (current-directory)) - tmp)) - pathspec)) +(defun absolute-pathname (pathspec &optional (default *default-pathname-defaults*)) + (if (relative-pathname-p pathspec) + (let ((tmp (merge-pathnames + pathspec + (make-pathname :name nil :type nil :version nil + :defaults default)))) + (if (relative-pathname-p tmp) + (merge-pathnames tmp (current-directory)) + tmp)) + pathspec)) + +(defun escape-wild-name (name) + (declare (simple-string name)) + (let (stack) + (loop for char across name + when (member char '(#\* #\[)) + do (push #\\ stack) + do (push char stack)) + (coerce (nreverse stack) 'simple-string))) (defun unmerge-pathnames (pathspec &optional (known *default-pathname-defaults*)) @@ -107,8 +115,6 @@ dir (cons :relative dir))))) (let ((path (absolute-pathname pathspec))) - (when (wild-pathname-p path) - (error "Pathname is wild: ~S." path)) (with-cstring (cfile (namestring path)) (let ((abspath (if (eq :directory (c-file-kind cfile t)) (make-pathname :name nil :type nil @@ -170,13 +176,13 @@ (let ((entry (readdir ,dp))) (if (null-pointer-p entry) nil - (let ((name + (let ((string (convert-from-cstring (osicat-dirent-name entry)))) - (if (member name '("." "..") + (if (member string '("." "..") :test #'string=) (,one-iter) - (normpath name))))))) + (normpath (escape-wild-name string)))))))) (macrolet ((,iterator () `(,',one-iter))) (setf ,dp (opendir ,cdir)) Index: src/packages.lisp diff -u src/packages.lisp:1.6 src/packages.lisp:1.7 --- src/packages.lisp:1.6 Sun Feb 29 18:43:09 2004 +++ src/packages.lisp Mon Mar 8 01:41:32 2004 @@ -35,6 +35,9 @@ When a relative pathname designator is used as a directory designator it is first resolved agains *default-pathname-default*, and then against the current directory. (With MERGE-PATHNAMES in both cases.)") + (:shadow + ;; DIRECTORY is used as constant internally. Let's not confuse other packages. + #:directory) (:export ;;; Evironment #:environment