CMUCL commit: src/pcl/simple-streams/external-formats (2 files)

Raymond Toy rtoy at common-lisp.net
Fri Aug 13 03:33:06 CEST 2010


    Date: Thursday, August 12, 2010 @ 21:33:06
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats

Modified: utf-32-be.lisp utf-32-le.lisp

utf-32-be.lisp:
o Fix typo (,code should be ,c).
o Don't output the BOM.

utf-32-le.lisp:
o Fix typo (,code should be ,c).


----------------+
 utf-32-be.lisp |   12 ++++--------
 utf-32-le.lisp |    8 ++++----
 2 files changed, 8 insertions(+), 12 deletions(-)


Index: src/pcl/simple-streams/external-formats/utf-32-be.lisp
diff -u src/pcl/simple-streams/external-formats/utf-32-be.lisp:1.9 src/pcl/simple-streams/external-formats/utf-32-be.lisp:1.10
--- src/pcl/simple-streams/external-formats/utf-32-be.lisp:1.9	Mon Jul 12 10:42:11 2010
+++ src/pcl/simple-streams/external-formats/utf-32-be.lisp	Thu Aug 12 21:33:05 2010
@@ -4,7 +4,7 @@
 ;;; This code was written by Raymond Toy and has been placed in the public
 ;;; domain.
 ;;;
-(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-32-be.lisp,v 1.9 2010-07-12 14:42:11 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-32-be.lisp,v 1.10 2010-08-13 01:33:05 rtoy Exp $")
 
 (in-package "STREAM")
 (intl:textdomain "cmucl")
@@ -35,9 +35,9 @@
 		  (lisp::surrogatep ,c))
 	      ;; Surrogates are illegal.  Use replacement character.
 	      (values (if ,error
-			  (if (>= ,code lisp:codepoint-limit)
-			      (funcall ,error "Illegal codepoint #x~4,'0X" ,code 4)
-			      (funcall ,error "Surrogate #x~4,'0X not allowed in UTF32" ,code 4))
+			  (if (>= ,c lisp:codepoint-limit)
+			      (funcall ,error "Illegal codepoint #x~4,'0X" ,c 4)
+			      (funcall ,error "Surrogate #x~4,'0X not allowed in UTF32" ,c 4))
 			  +replacement-character-code+)
 		      4))
 	     (t
@@ -49,10 +49,6 @@
 	      ;; Big-endian output
 	      (dotimes (,i 4)
 		(,output (ldb (byte 8 (* 8 (- 3 ,i))) ,c)))))
-       ;; Write BOM
-       (unless ,state
-	 (out #xFEFF)
-	 (setf ,state t))
        (cond ((lisp::surrogatep ,code)
 	      (out (if ,error
 		       (funcall ,error "Surrogate code #x~4,'0X is illegal for UTF32 output"
Index: src/pcl/simple-streams/external-formats/utf-32-le.lisp
diff -u src/pcl/simple-streams/external-formats/utf-32-le.lisp:1.9 src/pcl/simple-streams/external-formats/utf-32-le.lisp:1.10
--- src/pcl/simple-streams/external-formats/utf-32-le.lisp:1.9	Mon Jul 12 10:42:11 2010
+++ src/pcl/simple-streams/external-formats/utf-32-le.lisp	Thu Aug 12 21:33:05 2010
@@ -4,7 +4,7 @@
 ;;; This code was written by Raymond Toy and has been placed in the public
 ;;; domain.
 ;;;
-(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-32-le.lisp,v 1.9 2010-07-12 14:42:11 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-32-le.lisp,v 1.10 2010-08-13 01:33:05 rtoy Exp $")
 
 (in-package "STREAM")
 (intl:textdomain "cmucl")
@@ -35,10 +35,10 @@
 		  (lisp::surrogatep ,c))
 	      ;; Surrogates are illegal.  Use replacement character.
 	      (values (if ,error
-			  (if (>= ,code lisp:codepoint-limit)
-			      (funcall ,error "Illegal codepoint #x~4,'0X" ,code 4)
+			  (if (>= ,c lisp:codepoint-limit)
+			      (funcall ,error "Illegal codepoint #x~4,'0X" ,c 4)
 			      (funcall ,error "Surrogate #x~4,'0X not allowed in UTF32"
-				       ,code 4))
+				       ,c 4))
 			  +replacement-character-code+)
 		      4))
 	     (t



More information about the cmucl-commit mailing list