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

Raymond Toy rtoy at common-lisp.net
Wed Jun 30 06:02:54 CEST 2010


    Date: Wednesday, June 30, 2010 @ 00:02:54
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats

Modified: iso8859-1.lisp iso8859-2.lisp mac-roman.lisp utf-16-be.lisp
          utf-16-le.lisp utf-16.lisp utf-32-be.lisp utf-32-le.lisp
          utf-32.lisp utf-8.lisp void.lisp

Update external formats to include the new required error parameter
for octets-to-code and code-to-octets.


----------------+
 iso8859-1.lisp |    6 +++---
 iso8859-2.lisp |    6 +++---
 mac-roman.lisp |    6 +++---
 utf-16-be.lisp |    6 +++---
 utf-16-le.lisp |    6 +++---
 utf-16.lisp    |    6 +++---
 utf-32-be.lisp |    6 +++---
 utf-32-le.lisp |    6 +++---
 utf-32.lisp    |    6 +++---
 utf-8.lisp     |    6 +++---
 void.lisp      |    6 +++---
 11 files changed, 33 insertions(+), 33 deletions(-)


Index: src/pcl/simple-streams/external-formats/iso8859-1.lisp
diff -u src/pcl/simple-streams/external-formats/iso8859-1.lisp:1.3 src/pcl/simple-streams/external-formats/iso8859-1.lisp:1.4
--- src/pcl/simple-streams/external-formats/iso8859-1.lisp:1.3	Thu Jun 11 12:04:02 2009
+++ src/pcl/simple-streams/external-formats/iso8859-1.lisp	Wed Jun 30 00:02:53 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-1.lisp,v 1.3 2009-06-11 16:04:02 rtoy Rel $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/iso8859-1.lisp,v 1.4 2010-06-30 04:02:53 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -14,7 +14,7 @@
 (define-external-format :iso8859-1 (:size 1)
   ()
 
-  (octets-to-code (state input unput)
+  (octets-to-code (state input unput error)
     (values ,input 1))
-  (code-to-octets (code state output)
+  (code-to-octets (code state output error)
     (,output (if (> ,code 255) #x3F ,code))))
Index: src/pcl/simple-streams/external-formats/iso8859-2.lisp
diff -u src/pcl/simple-streams/external-formats/iso8859-2.lisp:1.2 src/pcl/simple-streams/external-formats/iso8859-2.lisp:1.3
--- src/pcl/simple-streams/external-formats/iso8859-2.lisp:1.2	Thu Jun 11 12:04:02 2009
+++ src/pcl/simple-streams/external-formats/iso8859-2.lisp	Wed Jun 30 00:02:53 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.2 2009-06-11 16:04:02 rtoy Rel $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/iso8859-2.lisp,v 1.3 2010-06-30 04:02:53 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -23,10 +23,10 @@
   ((table +iso-8859-2+ :type (simple-array (unsigned-byte 16) (96)))
    (itable (invert-table table) :type lisp::ntrie16))
 
-  (octets-to-code (state input unput code)
+  (octets-to-code (state input unput error code)
     `(let ((,code ,input))
        (values (if (< ,code 160) ,code (aref ,table (- ,code 160))) 1)))
-  (code-to-octets (code state output present)
+  (code-to-octets (code state output error present)
     `(,output (if (< ,code 160)
 		  ,code
 		  (let ((,code (get-inverse ,itable ,code)))
Index: src/pcl/simple-streams/external-formats/mac-roman.lisp
diff -u src/pcl/simple-streams/external-formats/mac-roman.lisp:1.3 src/pcl/simple-streams/external-formats/mac-roman.lisp:1.4
--- src/pcl/simple-streams/external-formats/mac-roman.lisp:1.3	Sun Jun 21 10:33:07 2009
+++ src/pcl/simple-streams/external-formats/mac-roman.lisp	Wed Jun 30 00:02:53 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.3 2009-06-21 14:33:07 rtoy Rel $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/mac-roman.lisp,v 1.4 2010-06-30 04:02:53 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -28,10 +28,10 @@
   ((table +mac-roman+ :type (simple-array (unsigned-byte 16) (128)))
    (itable (invert-table table) :type lisp::ntrie16))
 
-  (octets-to-code (state input unput code)
+  (octets-to-code (state input unput error code)
     `(let ((,code ,input))
        (values (if (< ,code 128) ,code (aref ,table (- ,code 128))) 1)))
-  (code-to-octets (code state output present)
+  (code-to-octets (code state output error present)
     `(,output (if (< ,code 128)
 		  ,code
 		  (let ((,code (get-inverse ,itable ,code)))
Index: src/pcl/simple-streams/external-formats/utf-16-be.lisp
diff -u src/pcl/simple-streams/external-formats/utf-16-be.lisp:1.4 src/pcl/simple-streams/external-formats/utf-16-be.lisp:1.5
--- src/pcl/simple-streams/external-formats/utf-16-be.lisp:1.4	Sun Oct 18 10:21:24 2009
+++ src/pcl/simple-streams/external-formats/utf-16-be.lisp	Wed Jun 30 00:02:53 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/utf-16-be.lisp,v 1.4 2009-10-18 14:21:24 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-16-be.lisp,v 1.5 2010-06-30 04:02:53 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -13,7 +13,7 @@
 (define-external-format :utf-16-be (:size 2)
   ()
 
-  (octets-to-code (state input unput c1 c2 code next)
+  (octets-to-code (state input unput error c1 c2 code next)
     `(let* ((,c1 ,input)
 	    (,c2 ,input)
 	    (,code (+ (* 256 ,c1) ,c2)))
@@ -48,7 +48,7 @@
 	      (setf ,code +replacement-character-code+))
 	     (t (setf ,state nil)))
        (values ,code 2)))
-  (code-to-octets (code state output c c1 c2)
+  (code-to-octets (code state output error c c1 c2)
     `(flet ((output (code)
 	      (,output (ldb (byte 8 8) code))
 	      (,output (ldb (byte 8 0) code))))
Index: src/pcl/simple-streams/external-formats/utf-16-le.lisp
diff -u src/pcl/simple-streams/external-formats/utf-16-le.lisp:1.4 src/pcl/simple-streams/external-formats/utf-16-le.lisp:1.5
--- src/pcl/simple-streams/external-formats/utf-16-le.lisp:1.4	Sun Oct 18 10:21:24 2009
+++ src/pcl/simple-streams/external-formats/utf-16-le.lisp	Wed Jun 30 00:02:53 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/utf-16-le.lisp,v 1.4 2009-10-18 14:21:24 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-16-le.lisp,v 1.5 2010-06-30 04:02:53 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -14,7 +14,7 @@
 (define-external-format :utf-16-le (:size 2)
   ()
 
-  (octets-to-code (state input unput c1 c2 code next)
+  (octets-to-code (state input unput error c1 c2 code next)
     `(let* ((,c1 ,input)
 	    (,c2 ,input)
 	    (,code (+ (* 256 ,c2) ,c1)))
@@ -49,7 +49,7 @@
 	      (error "Illegal character U+FFFE in UTF-16 sequence."))
 	     (t (setf ,state nil)))
       (values ,code 2)))
-  (code-to-octets (code state output c c1 c2)
+  (code-to-octets (code state output error c c1 c2)
     `(flet ((output (code)
 	      (,output (ldb (byte 8 0) code))
 	     (,output (ldb (byte 8 8) code))))
Index: src/pcl/simple-streams/external-formats/utf-16.lisp
diff -u src/pcl/simple-streams/external-formats/utf-16.lisp:1.6 src/pcl/simple-streams/external-formats/utf-16.lisp:1.7
--- src/pcl/simple-streams/external-formats/utf-16.lisp:1.6	Fri Jan 22 18:57:29 2010
+++ src/pcl/simple-streams/external-formats/utf-16.lisp	Wed Jun 30 00:02:53 2010
@@ -1,7 +1,7 @@
 ;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
 ;;;
 ;;; **********************************************************************
-(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-16.lisp,v 1.6 2010-01-22 23:57:29 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-16.lisp,v 1.7 2010-06-30 04:02:53 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -25,7 +25,7 @@
 (define-external-format :utf-16 (:size 2)
   ()
 
-  (octets-to-code (state input unput c1 c2 code wd next st)
+  (octets-to-code (state input unput error c1 c2 code wd next st)
     `(block nil
        (when (null ,state) (setf ,state (cons 0 nil)))
        (tagbody
@@ -85,7 +85,7 @@
 		   ;; Replace with REPLACEMENT CHARACTER.  
 		   (setf ,code +replacement-character-code+)))
 	    (return (values ,code ,wd))))))
-  (code-to-octets (code state output c c1 c2)
+  (code-to-octets (code state output error c c1 c2)
     `(flet ((output (code)
 	      (,output (ldb (byte 8 8) code))
 	      (,output (ldb (byte 8 0) code))))
Index: src/pcl/simple-streams/external-formats/utf-32-be.lisp
diff -u src/pcl/simple-streams/external-formats/utf-32-be.lisp:1.3 src/pcl/simple-streams/external-formats/utf-32-be.lisp:1.4
--- src/pcl/simple-streams/external-formats/utf-32-be.lisp:1.3	Mon Sep 28 14:12:59 2009
+++ src/pcl/simple-streams/external-formats/utf-32-be.lisp	Wed Jun 30 00:02:53 2010
@@ -4,14 +4,14 @@
 ;;; 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.3 2009-09-28 18:12:59 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-32-be.lisp,v 1.4 2010-06-30 04:02:53 rtoy Exp $")
 
 (in-package "STREAM")
 
 (define-external-format :utf-32-be (:size 4)
   ()
 
-  (octets-to-code (state input unput c c1 c2 c3 c4)
+  (octets-to-code (state input unput error c c1 c2 c3 c4)
     `(let* ((,c1 ,input)
 	    (,c2 ,input)
 	    (,c3 ,input)
@@ -29,6 +29,6 @@
 	     (t
 	      (values ,c 4)))))
 
-  (code-to-octets (code state output i)
+  (code-to-octets (code state output error i)
     `(dotimes (,i 4)
        (,output (ldb (byte 8 (* 8 (- 3 ,i))) ,code)))))
Index: src/pcl/simple-streams/external-formats/utf-32-le.lisp
diff -u src/pcl/simple-streams/external-formats/utf-32-le.lisp:1.3 src/pcl/simple-streams/external-formats/utf-32-le.lisp:1.4
--- src/pcl/simple-streams/external-formats/utf-32-le.lisp:1.3	Mon Sep 28 14:12:59 2009
+++ src/pcl/simple-streams/external-formats/utf-32-le.lisp	Wed Jun 30 00:02:53 2010
@@ -4,14 +4,14 @@
 ;;; 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.3 2009-09-28 18:12:59 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-32-le.lisp,v 1.4 2010-06-30 04:02:53 rtoy Exp $")
 
 (in-package "STREAM")
 
 (define-external-format :utf-32-le (:size 4)
   ()
 
-  (octets-to-code (state input unput c c1 c2 c3 c4)
+  (octets-to-code (state input unput error c c1 c2 c3 c4)
     `(let* ((,c1 ,input)
 	    (,c2 ,input)
 	    (,c3 ,input)
@@ -29,6 +29,6 @@
 	     (t
 	      (values ,c 4)))))
 
-  (code-to-octets (code state output i)
+  (code-to-octets (code state output error i)
     `(dotimes (,i 4)
        (,output (ldb (byte 8 (* 8 ,i)) ,code)))))
Index: src/pcl/simple-streams/external-formats/utf-32.lisp
diff -u src/pcl/simple-streams/external-formats/utf-32.lisp:1.5 src/pcl/simple-streams/external-formats/utf-32.lisp:1.6
--- src/pcl/simple-streams/external-formats/utf-32.lisp:1.5	Sun Oct 18 10:21:24 2009
+++ src/pcl/simple-streams/external-formats/utf-32.lisp	Wed Jun 30 00:02:53 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.lisp,v 1.5 2009-10-18 14:21:24 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-32.lisp,v 1.6 2010-06-30 04:02:53 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -29,7 +29,7 @@
 (define-external-format :utf-32 (:size 4)
   ()
 
-  (octets-to-code (state input unput code c1 c2 c3 c4 st wd)
+  (octets-to-code (state input unput code error c1 c2 c3 c4 st wd)
     `(block nil
        (when (null ,state) (setf ,state 0))
        (tagbody
@@ -70,7 +70,7 @@
 		   (go :again)))
 	    (return (values ,code ,wd))))))
 
-  (code-to-octets (code state output i c)
+  (code-to-octets (code state output error i c)
     `(flet ((out (,c)
 	      ;; Big-endian output
 	      (dotimes (,i 4)
Index: src/pcl/simple-streams/external-formats/utf-8.lisp
diff -u src/pcl/simple-streams/external-formats/utf-8.lisp:1.5 src/pcl/simple-streams/external-formats/utf-8.lisp:1.6
--- src/pcl/simple-streams/external-formats/utf-8.lisp:1.5	Mon Sep 28 14:12:59 2009
+++ src/pcl/simple-streams/external-formats/utf-8.lisp	Wed Jun 30 00:02:53 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/utf-8.lisp,v 1.5 2009-09-28 18:12:59 rtoy Exp $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/utf-8.lisp,v 1.6 2010-06-30 04:02:53 rtoy Exp $")
 
 (in-package "STREAM")
 
@@ -15,7 +15,7 @@
 
 (define-external-format :utf-8 (:min 1 :max 4)
   ()
-  (octets-to-code (state input unput c i j n)
+  (octets-to-code (state input unput error c i j n)
     `(labels ((utf8 (,c ,i)
 	       (declare (type (unsigned-byte 8) ,c)
 			(type (integer 1 5) ,i))
@@ -58,7 +58,7 @@
 	      ((< ,c #b11110000) (utf8 ,c 2))
 	      ((< ,c #b11111000) (utf8 ,c 3))
 	      (t (values +replacement-character-code+ 1))))))
-  (code-to-octets (code state output i j n p init)
+  (code-to-octets (code state output error i j n p init)
     `(flet ((utf8 (,n ,i)
           (let* ((,j (- 6 ,i))
              (,p (* 6 ,i))
Index: src/pcl/simple-streams/external-formats/void.lisp
diff -u src/pcl/simple-streams/external-formats/void.lisp:1.3 src/pcl/simple-streams/external-formats/void.lisp:1.4
--- src/pcl/simple-streams/external-formats/void.lisp:1.3	Thu Jun 11 12:04:02 2009
+++ src/pcl/simple-streams/external-formats/void.lisp	Wed Jun 30 00:02:53 2010
@@ -4,14 +4,14 @@
 ;;; 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/void.lisp,v 1.3 2009-06-11 16:04:02 rtoy Rel $")
+(ext:file-comment "$Header: /project/cmucl/cvsroot/src/pcl/simple-streams/external-formats/void.lisp,v 1.4 2010-06-30 04:02:53 rtoy Exp $")
 
 ;; This is actually implemented in the external-formats code
 ;; It appears here only for reference, and will never get loaded
 
 (define-external-format :void (:size 0)
   ()
-  (octets-to-code (state input unput)
+  (octets-to-code (state input unput error)
     `(error 'void-external-format))
-  (code-to-octets (code state output)
+  (code-to-octets (code state output error)
     `(error 'void-external-format)))



More information about the cmucl-commit mailing list