Changeset 11524 in project for chicken/branches/hygienic/utils.scm


Ignore:
Timestamp:
08/01/08 01:17:42 (12 years ago)
Author:
felix winkelmann
Message:

re-loading imported module into interpreter incorrectly renamed export list (export-lists are now sytax-stripped); started with guerilla setup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/hygienic/utils.scm

    r10952 r11524  
    440440        [file-exists? file-exists?]
    441441        [call-with-output-file call-with-output-file] )
    442     (lambda ext
    443       (let ([dir (or (getenv "TMPDIR") (getenv "TEMP") (getenv "TMP"))]
    444             [ext (if (pair? ext) (car ext) "tmp")])
     442    (lambda (#!optional (ext "tmp"))
     443      (let ([dir (or (getenv "TMPDIR") (getenv "TEMP") (getenv "TMP") "/tmp")])
    445444        (##sys#check-string ext 'create-temporary-file)
    446445        (let loop ()
    447446          (let* ([n (##sys#fudge 16)]
    448447                 [pn (make-pathname dir (##sys#string-append "t" (number->string n 16)) ext)] )
    449             (if (file-exists? pn)
    450                 (loop)
    451                 (call-with-output-file pn (lambda (p) pn)) ) ) ) ) ) ) )
     448            (cond ((file-exists? pn) (loop))
     449                  (else (call-with-output-file pn (lambda (p) pn)) ) ) ) ) ) ) ) )
    452450
    453451;; Directory string or list only contains path-separators
Note: See TracChangeset for help on using the changeset viewer.