From cc752168128f69975751dfc90daba8a7dd8ce00d Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 26 Nov 2004 04:47:35 +0000 Subject: [PATCH] Implement PATHNAME-RELATIVE?, which is not the negation of PATHNAME-ABSOLUTE?. --- v7/src/runtime/pathnm.scm | 7 ++++++- v7/src/runtime/runtime.pkg | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/v7/src/runtime/pathnm.scm b/v7/src/runtime/pathnm.scm index d0470dd0a..2e8f82824 100644 --- a/v7/src/runtime/pathnm.scm +++ b/v7/src/runtime/pathnm.scm @@ -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? diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 5b6ffaec5..10dd64ae3 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -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 -- 2.25.1