CMUCL commit: unicode-string-buffer-impl-branch src/code (extfmts.lisp)

Raymond Toy rtoy at common-lisp.net
Thu Oct 15 21:37:48 CEST 2009


    Date: Thursday, October 15, 2009 @ 15:37:48
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/code
     Tag: unicode-string-buffer-impl-branch

Modified: extfmts.lisp

o Update docstring for OCTETS-TO-STRING to match the implementation.
o Use AREF instead of BREF in EF-OCTETS-TO-STRING.


--------------+
 extfmts.lisp |   20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)


Index: src/code/extfmts.lisp
diff -u src/code/extfmts.lisp:1.18.4.6 src/code/extfmts.lisp:1.18.4.7
--- src/code/extfmts.lisp:1.18.4.6	Wed Oct  7 13:53:57 2009
+++ src/code/extfmts.lisp	Thu Oct 15 15:37:48 2009
@@ -5,7 +5,7 @@
 ;;; domain.
 ;;; 
 (ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/code/extfmts.lisp,v 1.18.4.6 2009-10-07 17:53:57 rtoy Exp $")
+ "$Header: /project/cmucl/cvsroot/src/code/extfmts.lisp,v 1.18.4.7 2009-10-15 19:37:48 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -708,7 +708,7 @@
 		   (octets-to-char ,extfmt state count
 				   (if (>= ptr end)
 				       (throw 'end-of-octets nil)
-				       (bref octets (incf ptr)))
+				       (aref octets (incf ptr)))
 				   (lambda (n) (decf ptr n))))
 	  (incf pos)
 	  (incf last-octet count)))
@@ -721,11 +721,17 @@
   "Octets-to-string converts an array of octets in Octets to a string
   according to the specified External-format.  The array of octets is
   bounded by Start (defaulting ot 0) and End (defaulting to the end of
-  the array.  If String is given, the string is stored there.  If
-  String is too short to hold all of the characters, it will be
-  adjusted (via adjust-array).  If String is not given, a new string
-  is created.  Three values are returned: the string, the number of
-  characters read, and the number of octets consumed."
+  the array.  If String is not given, a new string is created.  If
+  String is given, the converted octets are stored in String, starting
+  at S-Start (defaulting to the 0) and ending at S-End (defaulting to
+  the length of String).  If the string is not large enough to hold
+  all of characters, then some octets will not be converted.  A State
+  may also be specified; this is used as the state of the external
+  format.
+
+  Four values are returned: the string, the number of characters read,
+  the number of octets actually consumed and the new state of the
+  external format."
   (declare (type (simple-array (unsigned-byte 8) (*)) octets)
 	   (type kernel:index start s-start)
 	   (type (or kernel:index null) end)



More information about the cmucl-commit mailing list