Implement PATHNAME-RELATIVE?, which is not the negation of
authorChris Hanson <org/chris-hanson/cph>
Fri, 26 Nov 2004 04:47:35 +0000 (04:47 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 26 Nov 2004 04:47:35 +0000 (04:47 +0000)
PATHNAME-ABSOLUTE?.

v7/src/runtime/pathnm.scm
v7/src/runtime/runtime.pkg

index d0470dd0a51585937a728a60c8cfcd02cc4aa423..2e8f82824cba666f35fb26a3d9aab6cd582c2067 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: pathnm.scm,v 14.40 2004/10/28 19:38:13 cph Exp $
+$Id: pathnm.scm,v 14.41 2004/11/26 04:47:24 cph Exp $
 
 Copyright 1987,1988,1989,1990,1991,1992 Massachusetts Institute of Technology
 Copyright 1993,1994,1995,1996,2000,2001 Massachusetts Institute of Technology
@@ -162,6 +162,11 @@ these rules:
     (and (pair? directory)
         (eq? (car directory) 'ABSOLUTE))))
 
+(define (pathname-relative? pathname)
+  (let ((directory (pathname-directory pathname)))
+    (and (pair? directory)
+        (eq? (car directory) 'RELATIVE))))
+
 (define (pathname-wild? pathname)
   (let ((pathname (->pathname pathname)))
     ((host-type/operation/pathname-wild?
index 5b6ffaec5ff84ad32bc851be74a1502841725c29..10dd64ae32047b5dacaf8d40fd2043f89a82326e 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.519 2004/11/26 04:42:06 cph Exp $
+$Id: runtime.pkg,v 14.520 2004/11/26 04:47:35 cph Exp $
 
 Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
 Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
@@ -2519,6 +2519,7 @@ USA.
          pathname-new-name
          pathname-new-type
          pathname-new-version
+         pathname-relative?
          pathname-simplify
          pathname-type
          pathname-version