Skip to content
Snippets Groups Projects
Commit 03df8550 authored by wlott's avatar wlott
Browse files

Changed to use native pretty printer instead of XP.

parent e6df0ea0
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/defstruct.lisp,v 1.27 1991/11/07 17:32:11 wlott Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/defstruct.lisp,v 1.28 1991/12/05 06:25:25 wlott Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -669,26 +669,25 @@ ...@@ -669,26 +669,25 @@
(let* ((type (structure-ref structure 0)) (let* ((type (structure-ref structure 0))
(dd (info type defined-structure-info type))) (dd (info type defined-structure-info type)))
(cond (*print-pretty* (cond (*print-pretty*
(let ((slots (dd-slots dd))) (pprint-logical-block (stream nil :prefix "#S(" :suffix ")")
(xp:pprint-logical-block (stream (prin1 type stream)
(mapcar (let ((slots (dd-slots dd)))
#'(lambda (dsd) (when slots
(structure-ref structure
(dsd-index dsd)))
slots)
:prefix "#S(" :suffix ")")
(prin1 type stream)
(xp:pprint-exit-if-list-exhausted)
(write-char #\space stream)
(xp:pprint-indent :current 0 stream)
(loop
(prin1 (dsd-name (pop slots)) stream)
(write-char #\space stream) (write-char #\space stream)
(xp:pprint-newline :miser stream) (pprint-indent :current 0 stream)
(prin1 (xp:pprint-pop) stream) (pprint-newline :miser stream)
(xp:pprint-exit-if-list-exhausted) (loop
(write-char #\space stream) (pprint-pop)
(xp:pprint-newline :linear stream))))) (let ((slot (pop slots)))
(output-object (dsd-name slot) stream)
(write-char #\space stream)
(pprint-newline :miser stream)
(output-object (structure-ref structure (dsd-index slot))
stream)
(when (null slots)
(return))
(write-char #\space stream)
(pprint-newline :linear stream)))))))
(t (t
(write-string "#S(" stream) (write-string "#S(" stream)
(prin1 type stream) (prin1 type stream)
...@@ -703,6 +702,6 @@ ...@@ -703,6 +702,6 @@
(write-string "...)" stream))) (write-string "...)" stream)))
(declare (type index index)) (declare (type index index))
(write-char #\space stream) (write-char #\space stream)
(prin1 (dsd-name (car slots)) stream) (output-object (dsd-name (car slots)) stream)
(write-char #\space stream) (write-char #\space stream)
(prin1 (structure-ref structure index) stream)))))) (output-object (structure-ref structure index) stream))))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment