/[cmucl]/src/code/fd-stream.lisp
ViewVC logotype

Diff of /src/code/fd-stream.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.91.2.1.2.5 by rtoy, Fri Sep 25 22:56:11 2009 UTC revision 1.91.2.1.2.6 by rtoy, Sat Sep 26 13:31:50 2009 UTC
# Line 1380  Line 1380 
1380                        ;; since we already have size = 1.                        ;; since we already have size = 1.
1381                        (or (eq 'unsigned-byte (and (consp type) (car type)))                        (or (eq 'unsigned-byte (and (consp type) (car type)))
1382                            (eq type :default))                            (eq type :default))
1383                        ;; Character streams with :iso8859-1                        (eq type 'character)))
                       (and (eq type 'character))))  
1384              ;; We only create this buffer for streams of type              ;; We only create this buffer for streams of type
1385              ;; (unsigned-byte 8) or character streams with an external              ;; (unsigned-byte 8) or character streams with an external
1386              ;; format of :iso8859-1.  Because there's no buffer, the              ;; format of :iso8859-1.  Because there's no buffer, the
# Line 1390  Line 1389 
1389              (when *enable-stream-buffer-p*              (when *enable-stream-buffer-p*
1390                (setf (lisp-stream-in-buffer stream)                (setf (lisp-stream-in-buffer stream)
1391                      (make-array in-buffer-length                      (make-array in-buffer-length
1392                                  :element-type '(unsigned-byte 8))))                                  :element-type '(unsigned-byte 8)))
1393              (when (and *enable-stream-buffer-p*                #+unicode
1394                         (eq type 'character)                (when (and (eq type 'character)
1395                         (not (eq :iso8859-1 (fd-stream-external-format stream))))                           (not (eq :iso8859-1 (fd-stream-external-format stream))))
1396                ;; For character streams, we create the string-buffer so                  ;; For character streams, we create the string-buffer so
1397                ;; we can convert all available octets at once instead                  ;; we can convert all available octets at once instead
1398                ;; of for each character.  The string is one element                  ;; of for each character.  The string is one element
1399                ;; longer than in-buffer-length to leave room for                  ;; longer than in-buffer-length to leave room for
1400                ;; unreading.                  ;; unreading.
1401                ;;                  ;;
1402                ;; For ISO8859-1, we don't want this because it's very                  ;; For ISO8859-1, we don't want this because it's very
1403                ;; easy and quick to convert octets to iso8859-1.  (See                  ;; easy and quick to convert octets to iso8859-1.  (See
1404                ;; FAST-READ-CHAR.)                  ;; FAST-READ-CHAR.)
1405                (setf (lisp-stream-string-buffer stream)                  (setf (lisp-stream-string-buffer stream)
1406                      (make-string (1+ in-buffer-length)))                        (make-string (1+ in-buffer-length)))
1407                (setf (lisp-stream-string-buffer-len stream) 0)                  (setf (lisp-stream-string-buffer-len stream) 0)
1408                (setf (lisp-stream-string-index stream) 0))))                  (setf (lisp-stream-string-index stream) 0)))))
1409          (setf input-size size)          (setf input-size size)
1410          (setf input-type type)))          (setf input-type type)))
1411    

Legend:
Removed from v.1.91.2.1.2.5  
changed lines
  Added in v.1.91.2.1.2.6

  ViewVC Help
Powered by ViewVC 1.1.5