diff --git a/code/pprint.lisp b/code/pprint.lisp index 2dfd1f8c61bd440155460206d080acaa67bbd1d6..8612ec1d4a9e290a5801a1cd187988a10cd46382 100644 --- a/code/pprint.lisp +++ b/code/pprint.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pprint.lisp,v 1.32 2002/10/07 14:31:05 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pprint.lisp,v 1.33 2003/01/06 22:27:16 toy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1119,7 +1119,7 @@ (stringp array) (bit-vector-p array)) (output-ugly-object array stream)) - ((and *print-readably* (not (eq (array-element-type array) 't))) + (*print-readably* (pprint-raw-array stream array)) ((vectorp array) (pprint-vector stream array)) diff --git a/code/print.lisp b/code/print.lisp index be53b30202251b0340cb05fe0a72470ed0b99bb4..de3b73d67cec039e19e4ae230d23f06210ae9a30 100644 --- a/code/print.lisp +++ b/code/print.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.83 2002/10/07 14:31:05 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.84 2003/01/06 22:27:16 toy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1078,8 +1078,7 @@ (defun output-array-guts (array stream) (with-array-data ((data array) (start) (end)) (declare (ignore end)) - (cond ((and *print-readably* - (not (eq (array-element-type array) t))) + (cond (*print-readably* (write-string "#A(" stream) (output-object (array-element-type array) stream) (write-char #\Space) diff --git a/code/sharpm.lisp b/code/sharpm.lisp index b9255ad673d2a1a1ebb5a84201731288cfae2745..6b7fed140548b61530c02fc96594e11f5dbfdddc 100644 --- a/code/sharpm.lisp +++ b/code/sharpm.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sharpm.lisp,v 1.22 2001/03/04 20:12:42 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sharpm.lisp,v 1.23 2003/01/06 22:27:16 toy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -175,9 +175,9 @@ (cond (dimensions (collect ((dims)) (let* ((contents (read stream t nil t)) - (seq contents)) - (dotimes (axis dimensions - (make-array (dims) :initial-contents contents)) + (seq contents) + (zero-axis nil)) + (dotimes (axis dimensions) (unless (typep seq 'sequence) (%reader-error stream "#~DA axis ~D is not a sequence:~% ~S" @@ -185,19 +185,21 @@ (let ((len (length seq))) (dims len) (unless (= axis (1- dimensions)) - (when (zerop len) - (%reader-error stream - "#~DA axis ~D is empty, but is not ~ - the last dimension." - dimensions axis)) - (setq seq (elt seq 0)))))))) + (cond ((zerop len) + (setq zero-axis axis)) + (zero-axis + (%reader-error stream + "#~DA axis ~D is empty, but axis ~ + ~D is non-empty." + dimensions zero-axis axis)) + (t + (setq seq (elt seq 0))))))) + (make-array (dims) :initial-contents contents)))) (t (destructuring-bind (element-type dims contents) (read stream t nil t) (make-array dims :element-type element-type :initial-contents contents))))) - - (defun sharp-S (stream sub-char numarg) (ignore-numarg sub-char numarg)