Changeset 8286


Ignore:
Timestamp:
Jan 26, 2008, 5:15:02 PM (12 years ago)
Author:
gb
Message:

changes from working-0711 branch

Location:
trunk/source/level-1
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-files.lisp

    r8237 r8286  
    184184
    185185(defun create-file (path &key (if-exists :error) (create-directory t))
    186   (native-to-pathname (%create-file path :if-exists if-exists
     186  (let* ((p (%create-file path :if-exists if-exists
    187187                                      :create-directory create-directory)))
     188    (and p
     189         (native-to-pathname p))))
     190
    188191(defun %create-file (path &key
    189192                         (if-exists :error)
     
    195198  (assert (or (eql if-exists :overwrite)
    196199              (null if-exists)
     200              (eq if-exists :error)
    197201              (not (probe-file path))) ()
    198202          "~s ~s not implemented yet" :if-exists if-exists)
    199203  (let* ((unix-name (native-translated-namestring path))
    200204         (fd (fd-open unix-name (logior #$O_WRONLY #$O_CREAT #$O_TRUNC
    201                                         (if (null if-exists)
     205                                        (if (or (null if-exists)
     206                                                (eq if-exists :error))
    202207                                          #$O_EXCL
    203208                                          0)))))
    204209    (if (< fd 0)
    205       (if (eql fd (- #$EEXIST))         ; #$O_EXCL was set and file exists
     210      (if (and (null if-exists)
     211               (eql fd (- #$EEXIST)))
    206212        (return-from %create-file nil)
    207213        (signal-file-error fd path))
  • trunk/source/level-1/l1-readloop-lds.lisp

    r8205 r8286  
    327327                          (cons keyword params)
    328328                          keyword)))
    329                     (params param)))))))))))
     329                    (params (eval param))))))))))))
    330330
    331331;;; Read a form from the specified stream.
     
    410410
    411411(defun abnormal-application-exit ()
    412   (print-call-history)
    413   (force-output *debug-io*)
    414   (quit -1))
     412  (ignore-errors
     413    (print-call-history)
     414    (force-output *debug-io*)
     415    (quit -1))
     416  (#__exit -1))
    415417
    416418(defun break-loop-handle-error (condition error-pointer)
  • trunk/source/level-1/l1-streams.lisp

    r8266 r8286  
    55975597         (tem-path (merge-pathnames (make-pathname :name (%integer-to-string date) :type "tem" :defaults nil) path)))
    55985598    (loop
    5599       (when (not (probe-file tem-path)) (return tem-path))
     5599      (when (%create-file tem-path :if-exists nil) (return tem-path))     
    56005600      (setf (%pathname-name tem-path) (%integer-to-string (setq date (1+ date)))))))
    56015601
Note: See TracChangeset for help on using the changeset viewer.