diff --git a/asdf.asd b/asdf.asd index 2780bb2e35ae344798a5f8f11b0a8e31d5ce651f..c250c1acf61f6525f7ee6cf17d7539f275cbddd3 100644 --- a/asdf.asd +++ b/asdf.asd @@ -74,7 +74,7 @@ :licence "MIT" :description "Another System Definition Facility" :long-description "ASDF builds Common Lisp software organized into defined systems." - :version "2.33.5" ;; to be automatically updated by make bump-version + :version "2.33.6" ;; to be automatically updated by make bump-version :depends-on () #+asdf3 :encoding #+asdf3 :utf-8 ;; For most purposes, asdf itself specially counts as a builtin system. diff --git a/header.lisp b/header.lisp index 5b52488911d10f47fda6c53146fa0eebff1b527f..1106dade5db6cd1e71c83f8ec88bcde58cf9433a 100644 --- a/header.lisp +++ b/header.lisp @@ -1,5 +1,5 @@ ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*- -;;; This is ASDF 2.33.5: Another System Definition Facility. +;;; This is ASDF 2.33.6: Another System Definition Facility. ;;; ;;; Feedback, bug reports, and patches are all welcome: ;;; please mail to <asdf-devel@common-lisp.net>. diff --git a/uiop/run-program.lisp b/uiop/run-program.lisp index 614a3455413e97608f251a1aa5a00584be7bd90e..9d349557b45ce863eca52dea405db6a741e21cbe 100644 --- a/uiop/run-program.lisp +++ b/uiop/run-program.lisp @@ -180,6 +180,23 @@ by /bin/sh in POSIX" (declare (ignorable x)) (apply 'slurp-input-stream *standard-output* stream keys)) + (defmethod slurp-input-stream ((pathname pathname) input + &key + (element-type *default-stream-element-type*) + (external-format *utf-8-external-format*) + (if-exists :rename-and-delete) + (if-does-not-exist :create) + buffer-size + linewise) + (with-output-file (output pathname + :element-type element-type + :external-format external-format + :if-exists if-exists + :if-does-not-exist if-does-not-exist) + (copy-stream-to-stream + input output + :element-type element-type :buffer-size buffer-size :linewise linewise))) + (defmethod slurp-input-stream (x stream &key linewise prefix (element-type 'character) buffer-size &allow-other-keys) @@ -234,6 +251,7 @@ Otherwise, the output will be processed by SLURP-INPUT-STREAM, using OUTPUT as the first argument, and return whatever it returns, e.g. using :OUTPUT :STRING will have it return the entire output stream as a string. Use ELEMENT-TYPE and EXTERNAL-FORMAT for the stream passed to the OUTPUT processor." + ;; TODO: specially recognize :output pathname ? (declare (ignorable ignore-error-status element-type external-format)) #-(or abcl allegro clisp clozure cmu cormanlisp ecl gcl lispworks mcl sbcl scl xcl) (error "RUN-PROGRAM not implemented for this Lisp") diff --git a/uiop/stream.lisp b/uiop/stream.lisp index 9aec12ec1d7a06c816309747dd273c69b0972517..55e14651678c44098fd367b11c735c5ce527282e 100644 --- a/uiop/stream.lisp +++ b/uiop/stream.lisp @@ -12,7 +12,7 @@ #:*default-encoding* #:*utf-8-external-format* #:with-safe-io-syntax #:call-with-safe-io-syntax #:safe-read-from-string #:with-output #:output-string #:with-input - #:with-input-file #:call-with-input-file + #:with-input-file #:call-with-input-file #:with-output-file #:call-with-output-file #:finish-outputs #:format! #:safe-format! #:copy-stream-to-stream #:concatenate-files #:copy-file #:slurp-stream-string #:slurp-stream-lines #:slurp-stream-line @@ -186,10 +186,33 @@ Other keys are accepted but discarded." :if-does-not-exist if-does-not-exist) (funcall thunk s))) - (defmacro with-input-file ((var pathname &rest keys &key element-type external-format) &body body) - (declare (ignore element-type external-format)) - `(call-with-input-file ,pathname #'(lambda (,var) ,@body) ,@keys))) + (defmacro with-input-file ((var pathname &rest keys + &key element-type external-format if-does-not-exist) + &body body) + (declare (ignore element-type external-format if-does-not-exist)) + `(call-with-input-file ,pathname #'(lambda (,var) ,@body) ,@keys)) + + (defun call-with-output-file (pathname thunk + &key + (element-type *default-stream-element-type*) + (external-format *utf-8-external-format*) + (if-exists :rename-and-delete) + (if-does-not-exist :create)) + "Open FILE for input with given recognizes options, call THUNK with the resulting stream. +Other keys are accepted but discarded." + #+gcl2.6 (declare (ignore external-format)) + (with-open-file (s pathname :direction :output + :element-type element-type + #-gcl2.6 :external-format #-gcl2.6 external-format + :if-exists if-exists + :if-does-not-exist if-does-not-exist) + (funcall thunk s))) + (defmacro with-output-file ((var pathname &rest keys + &key element-type external-format if-exists if-does-not-exist) + &body body) + (declare (ignore element-type external-format if-exists if-does-not-exist)) + `(call-with-output-file ,pathname #'(lambda (,var) ,@body) ,@keys))) ;;; Ensure output buffers are flushed (with-upgradability () diff --git a/upgrade.lisp b/upgrade.lisp index b13ecf15356d901f81b2ce07c64b43c98fd2f651..8e45faa065adb49039e5a566a3e2fb291af7739a 100644 --- a/upgrade.lisp +++ b/upgrade.lisp @@ -52,7 +52,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO ;; "3.4.5.67" would be a development version in the official upstream of 3.4.5. ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5 ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67 - (asdf-version "2.33.5") + (asdf-version "2.33.6") (existing-version (asdf-version))) (setf *asdf-version* asdf-version) (when (and existing-version (not (equal asdf-version existing-version))) diff --git a/version.lisp-expr b/version.lisp-expr index 1ef4005bc5882aea62ba156f88d2a7dbfdeb2ffc..2b430e1a664e45e25c2b126ae4835eb0cdafc300 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -1 +1 @@ -"2.33.5" +"2.33.6"