projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.20.23: get rid of IGNORE-ERRORS in SB-INTROSPECT
[sbcl.git]
/
src
/
code
/
target-format.lisp
diff --git
a/src/code/target-format.lisp
b/src/code/target-format.lisp
index
91b8309
..
890b943
100644
(file)
--- a/
src/code/target-format.lisp
+++ b/
src/code/target-format.lisp
@@
-78,8
+78,7
@@
(function
(typecase character
(base-char
(function
(typecase character
(base-char
- (svref *format-directive-interpreters*
- (char-code character)))
+ (svref *format-directive-interpreters* (char-code character)))
(character nil)))
(*default-format-error-offset*
(1- (format-directive-end directive))))
(character nil)))
(*default-format-error-offset*
(1- (format-directive-end directive))))
@@
-228,12
+227,16
@@
(prin1 (next-arg) stream)
(write-char (next-arg) stream)))))
(prin1 (next-arg) stream)
(write-char (next-arg) stream)))))
+;;; "printing" as defined in the ANSI CL glossary, which is normative.
+(defun char-printing-p (char)
+ (and (not (eql char #\Space))
+ (graphic-char-p char)))
+
(defun format-print-named-character (char stream)
(defun format-print-named-character (char stream)
- (let* ((name (char-name char)))
- (cond (name
- (write-string (string-capitalize name) stream))
- (t
- (write-char char stream)))))
+ (cond ((not (char-printing-p char))
+ (write-string (string-capitalize (char-name char)) stream))
+ (t
+ (write-char char stream))))
(def-format-interpreter #\W (colonp atsignp params)
(interpret-bind-defaults () params
(def-format-interpreter #\W (colonp atsignp params)
(interpret-bind-defaults () params
@@
-374,7
+377,7
@@
(defun format-print-cardinal-aux (stream n period err)
(multiple-value-bind (beyond here) (truncate n 1000)
(defun format-print-cardinal-aux (stream n period err)
(multiple-value-bind (beyond here) (truncate n 1000)
- (unless (<= period 20)
+ (unless (<= period 21)
(error "number too large to print in English: ~:D" err))
(unless (zerop beyond)
(format-print-cardinal-aux stream beyond (1+ period) err))
(error "number too large to print in English: ~:D" err))
(unless (zerop beyond)
(format-print-cardinal-aux stream beyond (1+ period) err))