From 48e1d85e3116606ca6d7a072f243b6a472887c65 Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Tue, 23 Aug 1994 18:31:59 +0000 Subject: [PATCH] In OPEN, fixed :direction :io :if-does-not-exist :create to actually create. --- code/fd-stream.lisp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/fd-stream.lisp b/code/fd-stream.lisp index fd680be72..9de7a62a4 100644 --- a/code/fd-stream.lisp +++ b/code/fd-stream.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.33 1994/01/08 18:42:47 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.34 1994/08/23 18:31:59 ram Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1222,10 +1222,7 @@ non-server method is also significantly more efficient for large reads. :overwrite, :append, :supersede or nil :if-does-not-exist - one of :error, :create or nil See the manual for details." - - (unless (eq external-format :default) - (cerror "use default ASCII format" - "External format must be :DEFAULT: ~S" external-format)) + (declare (ignore external-format)) ;; First, make sure that DIRECTION is valid. Allow it to be changed if not. (setf direction @@ -1243,14 +1240,17 @@ non-server method is also significantly more efficient for large reads. (:probe (values t nil unix:o_rdonly))) (declare (type index mask)) (let* ((pathname (pathname filename)) - (namestring (unix-namestring pathname input))) + (namestring + (cond ((unix-namestring pathname input)) + ((and input (eq if-does-not-exist :create)) + (unix-namestring pathname nil))))) ;; Process if-exists argument if we are doing any output. (cond (output (unless if-exists-given (setf if-exists (if (eq (pathname-version pathname) :newest) - :new-version - :error))) + :new-version + :error))) (setf if-exists (assure-one-of if-exists '(:error :new-version :rename -- GitLab