Changeset 10104 in project


Ignore:
Timestamp:
03/23/08 12:33:22 (12 years ago)
Author:
Ivan Raikov
Message:

Added quotewrapped? predicate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/prerelease/chicken-setup.scm

    r10103 r10104  
    245245;;; Helper stuff
    246246
     247(define (quotewrapped? str)
     248  (and (string? str) (string-prefix? "\"" str) (string-suffix? "\"" str) ))
     249
    247250(define (quotewrap str)
    248   (if (or (string-any char-whitespace? str)
    249           (and *windows-shell* (string-any (lambda (c) (char=? c #\/)) str)))
    250       (string-append "\"" str "\"")
    251       str) )
     251  (cond ((quotewrapped? str) str)
     252        ((or (string-any char-whitespace? str)
     253             (and *windows-shell* (string-any (lambda (c) (char=? c #\/)) str)))
     254         (string-append "\"" str "\""))
     255        (else str)))
    252256
    253257(define (abort-setup)
Note: See TracChangeset for help on using the changeset viewer.