[flexi-streams-cvs] r11 - branches/hans

hhubner at common-lisp.net hhubner at common-lisp.net
Tue May 6 13:27:03 UTC 2008


Author: hhubner
Date: Tue May  6 09:27:01 2008
New Revision: 11

Modified:
   branches/hans/input.lisp
Log:
Update docstring


Modified: branches/hans/input.lisp
==============================================================================
--- branches/hans/input.lisp	(original)
+++ branches/hans/input.lisp	Tue May  6 09:27:01 2008
@@ -274,16 +274,16 @@
 
 (defmacro define-char-reader ((stream-var stream-class) &body body)
   "Helper macro to define methods for STREAM-READ-CHAR and
-BUFFER-READ-CHAR.  Defines a method for the class STREAM-CLASS using
+OCTETS-TO-STRING%.  Defines a method for the class STREAM-CLASS using
 the variable STREAM-VAR and the code body BODY wrapped with some
 standard code common to all methods defined here.  The return value of
 BODY is a character code.  In case of encoding problems, BODY must
 return the value returned by \(RECOVER-FROM-ENCODING-ERROR ...).  In
-addition, a method on BUFFER-READ-CHAR is defined with the first
-argument being the buffer, the second argument a STREAM-CLASS instance
-used only for dispatching.  The BUFFER-READ-CHAR generic function is
-used to shortcut through the streams mechanic from the
-OCTETS-TO-STRING function."
+addition, a method on OCTETS-TO-STRING% is defined with the first
+argument being the STREAM-CLASS (which is used only for dispatching),
+the second argument being the vector of octets to convert and the
+BEGIN and END keyword arguments which can be used to limit the
+conversion to a subsequence of the octet vector."
   (with-unique-names (char-code body-fn octets-var)
     (let ((body body))
       `(progn
@@ -655,15 +655,4 @@
                     (t (= octet peek-type)))
         finally (unless (eql octet eof-value)
                   (unread-byte octet flexi-input-stream))
-                (return octet)))
-
-(defun test-buffer-code-char ()
-  (let* ((vector (make-array 2 :element-type '(unsigned-byte 8) :initial-element (char-code #\F)))
-         (buffer (make-to-string-conversion-buffer :vector vector
-                                                   :position 0
-                                                   :end 2
-                                                   :eol-style :nl))
-         (dummy-stream (make-flexi-stream (make-string-input-stream "") :external-format (make-external-format :ascii))))
-    (dotimes (i 1000000)
-      (null (buffer-read-char buffer dummy-stream))
-      (setf (tscb-position buffer) 0))))
\ No newline at end of file
+                (return octet)))
\ No newline at end of file



More information about the Flexi-streams-cvs mailing list