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

Raymond Toy rtoy at common-lisp.net
Wed Jul 7 23:59:49 CEST 2010


    Date: Wednesday, July 7, 2010 @ 17:59:49
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats

Modified: iso8859-2.lisp mac-roman.lisp

iso8859-2.lisp:
mac-roman.lisp:
o Fix code so that the offending codepoint on output is actually
  passed to the error routine.  (Previously, we returned the value
  from the table which was always nil because the code did not have a
  valid output.)


----------------+
 iso8859-2.lisp |    6 +++---
 mac-roman.lisp |    8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)


Index: src/pcl/simple-streams/external-formats/iso8859-2.lisp
diff -u src/pcl/simple-streams/external-formats/iso8859-2.lisp:1.4 src/pcl/simple-streams/external-formats/iso8859-2.lisp:1.5
--- src/pcl/simple-streams/external-formats/iso8859-2.lisp:1.4	Fri Jul  2 19:13:11 2010
+++ src/pcl/simple-streams/external-formats/iso8859-2.lisp	Wed Jul  7 17:59:49 2010
@@ -4,7 +4,7 @@
 ;;; This code was written by Paul Foley and has been placed in the public
 ;;; domain.
 ;;;
-(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/iso8859-2.lisp,v 1.4 2010-07-02 23:13:11 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/iso8859-2.lisp,v 1.5 2010-07-07 21:59:49 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -29,9 +29,9 @@
   (code-to-octets (code state output error present)
     `(,output (if (< ,code 160)
 		  ,code
-		  (let ((,code (get-inverse ,itable ,code)))
+		  (let ((,present (get-inverse ,itable ,code)))
 		    (if ,code
-			(+ (the (unsigned-byte 7) ,code) 160)
+			(+ (the (unsigned-byte 7) ,present) 160)
 			(if ,error
 			    (funcall ,error "Cannot output codepoint #x~X to ISO8859-2 stream" ,code)
 			    #x3F)))))))
Index: src/pcl/simple-streams/external-formats/mac-roman.lisp
diff -u src/pcl/simple-streams/external-formats/mac-roman.lisp:1.5 src/pcl/simple-streams/external-formats/mac-roman.lisp:1.6
--- src/pcl/simple-streams/external-formats/mac-roman.lisp:1.5	Fri Jul  2 19:13:11 2010
+++ src/pcl/simple-streams/external-formats/mac-roman.lisp	Wed Jul  7 17:59:49 2010
@@ -4,7 +4,7 @@
 ;;; This code was written by Paul Foley and has been placed in the public
 ;;; domain.
 ;;;
-(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/mac-roman.lisp,v 1.5 2010-07-02 23:13:11 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/mac-roman.lisp,v 1.6 2010-07-07 21:59:49 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -34,9 +34,9 @@
   (code-to-octets (code state output error present)
     `(,output (if (< ,code 128)
 		  ,code
-		  (let ((,code (get-inverse ,itable ,code)))
-		    (if ,code
-			(+ (the (unsigned-byte 7) ,code) 128)
+		  (let ((,present (get-inverse ,itable ,code)))
+		    (if ,present
+			(+ (the (unsigned-byte 7) ,present) 128)
 			(if ,error
 			    (funcall ,error "Cannot output codepoint #x~X to MAC-ROMAN stream"
 				     ,code)



More information about the cmucl-commit mailing list