Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
7b652d03
Commit
7b652d03
authored
33 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Changed exported funs not to assign their arguments.
parent
a05ad6db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/filesys.lisp
+42
-47
42 additions, 47 deletions
code/filesys.lisp
with
42 additions
and
47 deletions
code/filesys.lisp
+
42
−
47
View file @
7b652d03
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/filesys.lisp,v 1.
9
1991/0
4
/2
5
1
3:25:48
ram Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/filesys.lisp,v 1.
10
1991/0
5
/2
8
1
7:50:35
ram Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -82,32 +82,27 @@
"Create a pathname from :host, :device, :directory, :name, :type and :version.
If any field is ommitted, it is obtained from :defaults as though by
merge-pathnames."
(
flet
((
make-it
(
host
device
directory
name
type
version
)
(
%make-pathname
(
if
host
(
if
(
stringp
host
)
(
coerce
host
'simple-string
)
host
)
(
%pathname-host
*default-pathname-defaults*
))
(
if
(
stringp
device
)
(
coerce
device
'simple-string
)
device
)
(
if
(
stringp
directory
)
(
%pathname-directory
(
parse-namestring
directory
))
directory
)
(
if
(
stringp
name
)
(
coerce
name
'simple-string
)
name
)
(
if
(
stringp
type
)
(
coerce
type
'simple-string
)
type
)
version
)))
(
if
defaults
(
let
((
defaults
(
pathname
defaults
)))
(
unless
hostp
(
setq
host
(
%pathname-host
defaults
)))
(
unless
devicep
(
setq
device
(
%pathname-device
defaults
)))
(
unless
directoryp
(
setq
directory
(
%pathname-directory
defaults
)))
(
unless
namep
(
setq
name
(
%pathname-name
defaults
)))
(
unless
typep
(
setq
type
(
%pathname-type
defaults
)))
(
unless
versionp
(
setq
version
(
%pathname-version
defaults
))))
(
unless
hostp
(
setq
host
(
%pathname-host
*default-pathname-defaults*
))))
(
when
(
stringp
directory
)
(
setq
directory
(
%pathname-directory
(
parse-namestring
directory
))))
(
%make-pathname
(
if
(
stringp
host
)
(
coerce
host
'simple-string
)
host
)
(
if
(
stringp
device
)
(
coerce
device
'simple-string
)
device
)
directory
(
if
(
stringp
name
)
(
coerce
name
'simple-string
)
name
)
(
if
(
stringp
type
)
(
coerce
type
'simple-string
)
type
)
version
))
(
make-it
(
if
hostp
host
(
%pathname-host
defaults
))
(
if
devicep
device
(
%pathname-device
defaults
))
(
if
directoryp
directory
(
%pathname-directory
defaults
))
(
if
namep
name
(
%pathname-name
defaults
))
(
if
typep
type
(
%pathname-type
defaults
))
(
if
versionp
version
(
%pathname-version
defaults
))))
(
make-it
host
device
directory
name
type
version
))))
;;; These can not be done by the accessors because the pathname arg may be
...
...
@@ -228,10 +223,8 @@
:name
name
:type
type
))))
(
pathname
(
setf
end
start
)
thing
)
(
stream
(
setf
end
start
)
(
pathname
(
file-name
thing
))))))
(
unless
(
or
(
null
host
)
(
null
(
pathname-host
pathname
))
...
...
@@ -241,7 +234,9 @@
'parse-namestring
(
pathname-host
pathname
)
host
))
(
values
pathname
end
)))
;;
;; ### ??? what should the second value be???
(
values
pathname
(
or
end
start
))))
(
defun
pathname
(
thing
)
...
...
@@ -265,22 +260,22 @@
gets it from Default-Version."
;;
;; finish hairy argument defaulting
(
s
et
q
pathname
(
pathname
pathname
))
(
setq
defaults
(
pathname
defaults
))
;;
;; make a new pathname
(
let
((
name
(
%pathname-name
pathname
))
(
device
(
%pathname-device
pathname
)))
(
%make-pathname
(
or
(
%pathname-host
pathname
)
(
%pathname-host
defaults
))
(
or
device
(
%pathname-device
defaults
))
(
or
(
%pathname-directory
pathname
)
(
%pathname-directory
defaults
))
(
or
name
(
%pathname-name
defaults
))
(
or
(
%pathname-type
pathname
)
(
%pathname-type
defaults
))
(
or
(
%pathname-version
pathname
)
(
if
name
default-version
(
or
(
%pathname-version
defaults
)
default-version
))))))
(
l
et
((
pathname
(
pathname
pathname
))
(
defaults
(
pathname
defaults
))
)
;;
;; make a new pathname
(
let
((
name
(
%pathname-name
pathname
))
(
device
(
%pathname-device
pathname
)))
(
%make-pathname
(
or
(
%pathname-host
pathname
)
(
%pathname-host
defaults
))
(
or
device
(
%pathname-device
defaults
))
(
or
(
%pathname-directory
pathname
)
(
%pathname-directory
defaults
))
(
or
name
(
%pathname-name
defaults
))
(
or
(
%pathname-type
pathname
)
(
%pathname-type
defaults
))
(
or
(
%pathname-version
pathname
)
(
if
name
default-version
(
or
(
%pathname-version
defaults
)
default-version
))))))
)
;;;; NAMESTRING and other stringification stuff.
...
...
@@ -450,9 +445,9 @@
(
defun
enough-namestring
(
pathname
&optional
(
defaults
*default-pathname-defaults*
))
"Returns a string which uniquely identifies PATHNAME w.r.t. DEFAULTS."
(
s
et
q
pathname
(
pathname
pathname
))
(
setq
defaults
(
pathname
defaults
))
(
let*
(
(
device
(
%pathname-device
pathname
))
(
l
et
*
((
pathname
(
pathname
pathname
))
(
defaults
(
pathname
defaults
))
(
device
(
%pathname-device
pathname
))
(
directory
(
%pathname-directory
pathname
))
(
name
(
%pathname-name
pathname
))
(
type
(
%pathname-type
pathname
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment