Changeset 6401 for branches/x8664-call


Ignore:
Timestamp:
May 3, 2007, 5:02:24 PM (13 years ago)
Author:
gb
Message:

LOGICAL-PATHNAME: signal a type-error if there's no logical-host.
(Define a predicate that that type-error can claim isn't satisfied.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/x8664-call/ccl/level-1/l1-pathnames.lisp

    r5684 r6401  
    353353(defvar %empty-logical-pathname% (%cons-logical-pathname nil nil nil nil nil))
    354354
     355(defun logical-pathname-namestring-p (string)
     356  (multiple-value-bind (sstr start end) (get-sstring string)
     357    (let ((host (pathname-host-sstr sstr start end t)))
     358      (and host (not (eq host :unspecific))))))
     359
     360 
    355361;; This extends CL in that it allows a host-less pathname, like "foo;bar;baz".
    356362(defun logical-pathname (thing &aux (path thing))
     
    364370       ;; Prescan the host, to avoid unknown host errors.
    365371       (let ((host (pathname-host-sstr sstr start end t)))
     372         (when (or (null host) (eq host :unspecific))
     373           (report-bad-arg path '(satisfies logical-pathname-namestring-p)))
    366374         (let ((%logical-host-translations% (cons (list host) %logical-host-translations%)))
    367375           (declare (special %logical-host-translations%))
Note: See TracChangeset for help on using the changeset viewer.