#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/dosdir.scm,v 1.5 1992/08/28 16:06:37 jinx Exp $
+$Id: dosdir.scm,v 1.6 1992/11/03 22:42:29 jinx Exp $
Copyright (c) 1992 Massachusetts Institute of Technology
(declare (usual-integrations))
\f
(define directory-read/adjust-patterns? true)
+(define *expand-directory-prefixes?* true)
(define (directory-read pattern #!optional sort?)
(if (if (default-object? sort?) true sort?)
(map (lambda (pathname)
(merge-pathnames pathname directory-path))
(let ((pathnames
- (map ->pathname
- (generate-directory-pathnames directory-path))))
+ (let ((fnames (generate-directory-pathnames directory-path)))
+ (fluid-let ((*expand-directory-prefixes?* false))
+ (map ->pathname fnames)))))
(if (and (eq? (pathname-name pattern) 'WILD)
(eq? (pathname-type pattern) 'WILD))
pathnames
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/dospth.scm,v 1.16 1992/10/08 18:20:25 jinx Exp $
+$Id: dospth.scm,v 1.17 1992/11/03 22:42:35 jinx Exp $
Copyright (c) 1992 Massachusetts Institute of Technology
component)))))
(define (expand-directory-prefixes string)
- (if (string-null? string)
+ (if (or (string-null? string)
+ (not *expand-directory-prefixes?*))
(list string)
(case (string-ref string 0)
((#\$)
- (let ((name (string-tail string 1)))
- (let ((value (get-environment-variable name)))
- (if (not value)
- (error "Unbound environment variable:" name))
- (string-components value sub-directory-delimiters))))
+ (let* ((name (string-tail string 1))
+ (value (get-environment-variable name)))
+ (if (not value)
+ (list string)
+ (string-components value sub-directory-delimiters))))
((#\~)
(let ((user-name (substring string 1 (string-length string))))
(string-components
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/unxdir.scm,v 14.9 1992/02/08 15:08:44 cph Exp $
+$Id: unxdir.scm,v 14.10 1992/11/03 22:42:56 jinx Exp $
-Copyright (c) 1988-92 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(declare (usual-integrations))
\f
+(define *expand-directory-prefixes?* true)
+
(define (directory-read pattern #!optional sort?)
(if (if (default-object? sort?) true sort?)
(sort (directory-read-nosort pattern) pathname<?)
(map (lambda (pathname)
(merge-pathnames pathname directory-path))
(let ((pathnames
- (map ->pathname
- (generate-directory-pathnames directory-path))))
+ (let ((fnames (generate-directory-pathnames directory-path)))
+ (fluid-let ((*expand-directory-prefixes?* false))
+ (map ->pathname fnames)))))
(if (and (eq? (pathname-name pattern) 'WILD)
(eq? (pathname-type pattern) 'WILD))
pathnames
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/unxpth.scm,v 14.12 1992/08/12 08:42:46 jinx Exp $
+$Id: unxpth.scm,v 14.13 1992/11/03 22:42:43 jinx Exp $
Copyright (c) 1988-1992 Massachusetts Institute of Technology
component))
(define (expand-directory-prefixes string)
- (if (string-null? string)
+ (if (or (string-null? string)
+ (not *expand-directory-prefixes?*))
(list string)
(case (string-ref string 0)
((#\$)