Changeset 5050


Ignore:
Timestamp:
Aug 28, 2006, 3:57:15 AM (18 years ago)
Author:
Gary Byers
Message:

Use READ-CHAR instead of STREAM-READ-CHAR, since it may be faster in
some cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-reader.lisp

    r4927 r5050  
    438438
    439439(defun %next-char-and-attr (stream &optional (attrtab (rdtab.ttab *readtable*)))
    440   (let* ((ch (stream-read-char  stream)))
     440  (let* ((ch (read-char stream nil :eof)))
    441441    (if (eq ch :eof)
    442442      (values nil nil)
     
    536536         (multi-escaped nil))
    537537    (do* ((attrtab (rdtab.ttab *readtable*))
    538           (char 1stchar (stream-read-char stream)))
     538          (char 1stchar (read-char stream nil :eof )))
    539539         ((eq char :eof))
    540540      (flet ((add-note-escape-pos (char token escapes)
     
    547547                    (= attr $cht_wsp))
    548548            (when (or (not (= attr $cht_wsp)) %keep-whitespace%)
    549               (stream-unread-char stream char))
     549              (unread-char char stream))
    550550            (return ))
    551551          (if (= attr $cht_ill)
     
    573573                          (setq double-colon t)
    574574                          (progn
    575                             (stream-unread-char stream nextch)
     575                            (unread-char nextch stream)
    576576                            (setq double-colon nil)))
    577577                        (%casify-token token escapes)
     
    781781              (let* ((ch nil))
    782782                (loop
    783                     (if (or (eq :eof (setq ch (stream-read-char stream)))
     783                    (if (or (eq :eof (setq ch (read-char stream nil :eof)))
    784784                            (eq ch #\NewLine)
    785785                            (eq ch *alternate-line-terminator*))
Note: See TracChangeset for help on using the changeset viewer.