... |
... |
@@ -1221,15 +1221,32 @@ a host-structure or string." |
1221
|
1221
|
|
1222
|
1222
|
(defun %%pathname-match-p (pathname wildname)
|
1223
|
1223
|
(macrolet ((frob (field &optional (op 'components-match ))
|
1224
|
|
- `(or (eq (,field wildname) :wild)
|
1225
|
|
- (,op (,field pathname) (,field wildname)))))
|
1226
|
|
- (and (or (null (%pathname-host wildname))
|
1227
|
|
- (eq (%pathname-host wildname) (%pathname-host pathname)))
|
1228
|
|
- (frob %pathname-device)
|
1229
|
|
- (frob %pathname-directory directory-components-match)
|
1230
|
|
- (frob %pathname-name)
|
1231
|
|
- (frob %pathname-type)
|
1232
|
|
- (frob %pathname-version))))
|
|
1224
|
+ `(,op (,field pathname) (,field wildname))))
|
|
1225
|
+ #+nil
|
|
1226
|
+ (progn
|
|
1227
|
+ (describe pathname)
|
|
1228
|
+ (describe wildname))
|
|
1229
|
+ (and (or (null (%pathname-host wildname))
|
|
1230
|
+ (eq (%pathname-host wildname) (%pathname-host pathname)))
|
|
1231
|
+ (flet ((device-components-match (thing wild)
|
|
1232
|
+ (or (eq thing wild)
|
|
1233
|
+ (eq wild :wild)
|
|
1234
|
+ ;; A device component of :unspecific matches
|
|
1235
|
+ ;; nil.
|
|
1236
|
+ (or (and (null thing) (eq wild :unspecific))
|
|
1237
|
+ (and (eq thing :unspecific) (eq wild nil))))))
|
|
1238
|
+ (frob %pathname-device device-components-match))
|
|
1239
|
+ #+nil
|
|
1240
|
+ (frob %pathname-device)
|
|
1241
|
+ (frob %pathname-directory directory-components-match)
|
|
1242
|
+ (frob %pathname-name)
|
|
1243
|
+ (frob %pathname-type)
|
|
1244
|
+ (flet ((version-components-match (thing wild)
|
|
1245
|
+ (or (eq thing wild)
|
|
1246
|
+ (eq wild :wild)
|
|
1247
|
+ ;; A version component matches of :newest matches nil.
|
|
1248
|
+ (compare-version-component thing wild))))
|
|
1249
|
+ (frob %pathname-version version-components-match)))))
|
1233
|
1250
|
|
1234
|
1251
|
;; Like PATHNAME-MATCH-P but the pathnames should not be search-lists.
|
1235
|
1252
|
;; Primarily intended for TRANSLATE-LOGICAL-PATHNAME and friends,
|