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
95125ba8
Commit
95125ba8
authored
19 years ago
by
rtoy
Browse files
Options
Downloads
Patches
Plain Diff
The defaults arg for PARSE-NAMESTRING is a pathname designator, not a
pathname, Adjust PARSE-NAMESTRING to accept pathname designators.
parent
f5ac7c0b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/pathname.lisp
+24
-23
24 additions, 23 deletions
code/pathname.lisp
with
24 additions
and
23 deletions
code/pathname.lisp
+
24
−
23
View file @
95125ba8
...
...
@@ -4,7 +4,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pathname.lisp,v 1.
79
2005/09/2
4 01:26:37
rtoy Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pathname.lisp,v 1.
80
2005/09/2
5 21:42:14
rtoy Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -951,7 +951,7 @@ a host-structure or string."
a physical host structure or host namestring."
(
declare
(
type
path-designator
thing
)
(
type
(
or
list
string
host
(
member
:unspecific
))
host
)
(
type
path
name
defaults
)
(
type
path
-designator
defaults
)
(
type
index
start
)
(
type
(
or
index
null
)
end
))
;; Generally, redundant specification of information in software,
...
...
@@ -1006,27 +1006,28 @@ a host-structure or string."
(
host
host
))))
(
declare
(
type
(
or
null
host
)
host
))
(
etypecase
thing
(
simple-string
(
%parse-namestring
thing
host
defaults
start
end
junk-allowed
))
(
string
(
%parse-namestring
(
coerce
thing
'simple-string
)
host
defaults
start
end
junk-allowed
))
(
pathname
(
let
((
host
(
if
host
host
(
%pathname-host
defaults
))))
(
unless
(
eq
host
(
%pathname-host
thing
))
(
error
"Hosts do not match: ~S and ~S."
host
(
%pathname-host
thing
))))
(
values
thing
start
))
(
stream
(
let
((
name
(
file-name
thing
)))
(
unless
name
(
error
'simple-type-error
:datum
thing
:expected-type
'pathname
:format-control
"Can't figure out the file associated with stream:~% ~S"
:format-arguments
(
list
thing
)))
(
values
name
nil
))))))
(
with-pathname
(
defaults
defaults
)
(
etypecase
thing
(
simple-string
(
%parse-namestring
thing
host
defaults
start
end
junk-allowed
))
(
string
(
%parse-namestring
(
coerce
thing
'simple-string
)
host
defaults
start
end
junk-allowed
))
(
pathname
(
let
((
host
(
if
host
host
(
%pathname-host
defaults
))))
(
unless
(
eq
host
(
%pathname-host
thing
))
(
error
"Hosts do not match: ~S and ~S."
host
(
%pathname-host
thing
))))
(
values
thing
start
))
(
stream
(
let
((
name
(
file-name
thing
)))
(
unless
name
(
error
'simple-type-error
:datum
thing
:expected-type
'pathname
:format-control
"Can't figure out the file associated with stream:~% ~S"
:format-arguments
(
list
thing
)))
(
values
name
nil
)))))))
;;; NAMESTRING -- Interface
...
...
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