Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
03df8550
Commit
03df8550
authored
33 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Changed to use native pretty printer instead of XP.
parent
e6df0ea0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/defstruct.lisp
+21
-22
21 additions, 22 deletions
code/defstruct.lisp
with
21 additions
and
22 deletions
code/defstruct.lisp
+
21
−
22
View file @
03df8550
...
@@ -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.2
7
1991/1
1
/0
7 17:32:11
wlott Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/defstruct.lisp,v 1.2
8
1991/1
2
/0
5 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
))))))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment