Changeset 5628


Ignore:
Timestamp:
Dec 18, 2006, 11:57:49 AM (18 years ago)
Author:
Gary Byers
Message:

Try (halfheartedly) to maintain PATHNAME-VERSION of physical
pathnames. (Totally meaningless, but failing to do this leads to many
test failures.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-files.lisp

    r4757 r5628  
    204204(defun %pathname-version (pathname)
    205205  (if (logical-pathname-p pathname)
    206       (%logical-pathname-version pathname)
    207       :newest))
     206    (%logical-pathname-version pathname)
     207    (%physical-pathname-version pathname)))
    208208
    209209
     
    215215(defun pathname-version (thing)  ; redefined later in this file
    216216  (declare (ignore thing))
    217   :unspecific)
     217  nil)
    218218
    219219(defmethod print-object ((pathname pathname) stream)
     
    339339(defun file-namestring (path)
    340340  "Return a string representation of the name used in the pathname."
    341   (let* ((name (pathname-name path))
     341  (let* ((path (pathname path))
     342         (name (pathname-name path))
    342343         (type (pathname-type path))
    343          (version (pathname-version path)))
     344         (version (if (typep path 'logical-pathname) (pathname-version path))))
    344345    (file-namestring-from-parts name type version)))
    345346
     
    408409  (if (neq host :unspecific)
    409410    (%cons-logical-pathname dir name type host version)
    410     (%cons-pathname dir name type)))
     411    (%cons-pathname dir name type version)))
    411412
    412413(defun pathname (path)
     
    452453        (setq name (%std-name-component (%substr sstr start-pos end-pos))))
    453454      (if (eq host :unspecific)
    454         (%cons-pathname directory name type)
     455        (%cons-pathname directory name type version)
    455456        (%cons-logical-pathname directory name type host version)))))
    456457
     
    510511  (setq path
    511512        (if (eq host :unspecific)
    512           (%cons-pathname directory name type)
     513          (%cons-pathname directory name type version)
    513514          (%cons-logical-pathname
    514515           (or directory
     
    751752  (typecase path
    752753    (logical-pathname (%logical-pathname-version path))
    753     (pathname :unspecific)
     754    (pathname (%physical-pathname-version path))
    754755    (string
    755756     (multiple-value-bind (sstr start end) (get-sstring path)
    756757       (multiple-value-bind (newstart host) (pathname-directory-end sstr start end)
    757758         (if (eq host :unspecific)
    758            :unspecific
     759           nil
    759760           (pathname-version-sstr sstr newstart end)))))
    760761    (t (report-bad-arg path pathname-arg-type))))
Note: See TracChangeset for help on using the changeset viewer.