Changeset 9408
- Timestamp:
- May 8, 2008, 8:05:58 AM (17 years ago)
- Location:
- branches/working-0711/ccl/level-1
- Files:
-
- 2 edited
-
l1-io.lisp (modified) (9 diffs)
-
l1-streams.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/level-1/l1-io.lisp
r8919 r9408 35 35 36 36 (defun force-output (&optional stream) 37 (stream-force-output ( real-print-stream stream))37 (stream-force-output (%real-print-stream stream)) 38 38 nil) 39 39 … … 45 45 "Output #\Newline only if the OUTPUT-STREAM is not already at the 46 46 start of a line. Return T if #\Newline needed." 47 (stream-fresh-line (real-print-stream output-stream))) 48 47 (stream-fresh-line (%real-print-stream output-stream))) 48 49 (defun column (&optional stream) 50 (let* ((stream (%real-print-stream stream))) 51 (stream-line-column stream))) 49 52 50 53 (defun clear-input (&optional input-stream) … … 55 58 (defun write-char (char &optional (output-stream nil)) 56 59 "Output CHAR to OUTPUT-STREAM." 57 (let* ((stream ( real-print-stream output-stream)))60 (let* ((stream (%real-print-stream output-stream))) 58 61 (if (typep stream 'basic-stream) 59 62 (let* ((ioblock (basic-stream-ioblock stream))) 60 63 (funcall (ioblock-write-char-function ioblock) ioblock char)) 61 (stream-write-char (real-print-stream output-stream)char))64 (stream-write-char stream char)) 62 65 char)) 63 66 … … 66 69 "Write the characters of the subsequence of STRING bounded by START 67 70 and END to OUTPUT-STREAM." 68 (let* ((stream ( real-print-stream output-stream)))71 (let* ((stream (%real-print-stream output-stream))) 69 72 (if (typep stream 'basic-stream) 70 73 (let* ((ioblock (basic-stream-ioblock stream))) … … 95 98 "Write the characters of the subsequence of STRING bounded by START 96 99 and END to OUTPUT-STREAM then output a #\Newline at end." 97 (let ((stream (real-print-stream output-stream))) 98 (write-string string stream :start start :end end) 99 (terpri stream) 100 string)) 100 (write-string string output-stream :start start :end end) 101 (terpri output-stream) 102 string) 101 103 102 104 (defun terpri (&optional (stream *standard-output*)) 103 (let* ((stream ( real-print-stream stream)))105 (let* ((stream (%real-print-stream stream))) 104 106 (if (typep stream 'basic-stream) 105 107 (let* ((ioblock (basic-stream-ioblock stream))) 106 108 (funcall (ioblock-write-char-function ioblock) ioblock #\newline)) 107 (stream-write-char (real-print-stream stream)#\newline))109 (stream-write-char stream #\newline)) 108 110 nil)) 109 111 … … 689 691 (let ((strlen 0) (exponent-char (float-exponent-char float))) 690 692 (declare (fixnum exp strlen)) 691 (setq stream ( real-print-stream stream))693 (setq stream (%real-print-stream stream)) 692 694 (if (and (not nanning)(nan-or-infinity-p float)) 693 695 (print-a-nan float stream) … … 1674 1676 ((streamp stream) 1675 1677 stream) 1678 ;; This never gets called because streamp is true for xp-structure... 1676 1679 ((istruct-typep stream 'xp-structure) 1677 1680 (get-xp-stream stream)) … … 1679 1682 (report-bad-arg stream '(or stream (member nil t)))))) 1680 1683 1684 (declaim (inline %real-print-stream)) 1685 (defun %real-print-stream (&optional (stream nil)) 1686 (cond ((null stream) 1687 *standard-output*) 1688 ((eq stream t) 1689 *terminal-io*) 1690 (t stream))) 1691 1681 1692 (defun write-1 (object stream &optional levels-left) 1682 (setq stream ( real-print-stream stream))1693 (setq stream (%real-print-stream stream)) 1683 1694 (when (not levels-left) 1684 1695 (setq levels-left … … 1821 1832 "Output a newline, the mostly READable printed representation of OBJECT, and 1822 1833 space to the specified STREAM." 1823 (setq stream (real-print-stream stream))1824 1834 (terpri stream) 1825 1835 (let ((*print-escape* t)) -
branches/working-0711/ccl/level-1/l1-streams.lisp
r9242 r9408 102 102 103 103 (defmethod stream-element-type ((x t)) 104 (report-bad-arg x 'stream)) 105 106 (defmethod stream-force-output ((x t)) 104 107 (report-bad-arg x 'stream)) 105 108 … … 5836 5839 5837 5840 5838 (defun column (&optional stream)5839 (let* ((stream (real-print-stream stream)))5840 (stream-line-column stream)))5841 5842 5841 (defun (setf %ioblock-external-format) (ef ioblock) 5843 5842 (let* ((encoding (get-character-encoding (external-format-character-encoding ef)))
Note:
See TracChangeset
for help on using the changeset viewer.
