Changeset 9425


Ignore:
Timestamp:
May 9, 2008, 10:09:40 AM (11 years ago)
Author:
gb
Message:

Avoid STREAMP in WRITE-CHAR, WRITE-STRING.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711-perf/ccl/level-1/l1-io.lisp

    r8919 r9425  
    5555(defun write-char (char &optional (output-stream nil))
    5656  "Output CHAR to OUTPUT-STREAM."
    57   (let* ((stream (real-print-stream output-stream)))
     57  (let* ((stream (if (null output-stream)
     58                   *standard-output*
     59                   (if (eq output-stream t)
     60                     *terminal-io*
     61                     (if (istruct-typep output-stream 'xp-structure)
     62                       (get-xp-stream output-stream)
     63                       output-stream)))))
    5864    (if (typep stream 'basic-stream)
    5965      (let* ((ioblock (basic-stream-ioblock stream)))
    6066        (funcall (ioblock-write-char-function ioblock) ioblock char))
    61       (stream-write-char (real-print-stream output-stream) char))
     67      (stream-write-char stream char))
    6268    char))
    6369
     
    6672  "Write the characters of the subsequence of STRING bounded by START
    6773and END to OUTPUT-STREAM."
    68   (let* ((stream (real-print-stream output-stream)))
     74  (let* ((stream (if (null output-stream)
     75                   *standard-output*
     76                   (if (eq output-stream t)
     77                     *terminal-io*
     78                     (if (istruct-typep output-stream 'xp-structure)
     79                       (get-xp-stream output-stream)
     80                       output-stream)))))
    6981    (if (typep stream 'basic-stream)
    7082      (let* ((ioblock (basic-stream-ioblock stream)))
     
    88100      (if (and (not start-p) (not end-p))
    89101        (stream-write-string stream string)
    90         (stream-write-string stream string start end)))
    91   string))
     102        (stream-write-string stream string start end)))))
    92103
    93104(defun write-line (string &optional output-stream
Note: See TracChangeset for help on using the changeset viewer.