From 502f4ae80f6ace802640ae3108bd9c75f40d504b Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Fri, 14 Aug 1992 04:15:56 +0000 Subject: [PATCH] Simplify parse-directory-component. --- v7/src/runtime/dospth.scm | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/v7/src/runtime/dospth.scm b/v7/src/runtime/dospth.scm index fecfc1414..6a829592d 100644 --- a/v7/src/runtime/dospth.scm +++ b/v7/src/runtime/dospth.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/dospth.scm,v 1.13 1992/08/14 03:50:58 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/dospth.scm,v 1.14 1992/08/14 04:15:56 jinx Exp $ Copyright (c) 1992 Massachusetts Institute of Technology @@ -114,31 +114,12 @@ MIT in each case. |# directory)) (define (parse-directory-component component) - (define (->field field) - (cond ((eq? field 'WILD) - "*") - ((not field) - "") - ((not (string? field)) - (error "->field: Unknown field" field)) - (else - field))) - (if (string=? ".." component) 'UP (let ((len (string-length component))) (cond ((substring-find-previous-char component 0 len #\.) ;; Handle screwy directories with dots in their names. - => - (lambda (posn) - (parse-name component - (lambda (before after) - (let ((before (->field before))) - (if (string=? before component) - component - (string-append before - "." - (->field after)))))))) + (parse-name component unparse-name)) ((> len 8) (substring component 0 8)) (else -- 2.25.1