CMUCL commit: src/code (fd-stream.lisp)

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


    Date: Tuesday, June 29, 2010 @ 20:52:15
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/code

Modified: fd-stream.lisp

Add two more slots to an fd-stream to indicate how to handle errors
when converting octets to characters or characters to octets.  These
aren't currently being used, but will be.

A basic cross-compile is needed.  When CMUCL asks about incompatible
structures, select the CLOBBER-IT restart in all cases.


----------------+
 fd-stream.lisp |   17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)


Index: src/code/fd-stream.lisp
diff -u src/code/fd-stream.lisp:1.101 src/code/fd-stream.lisp:1.102
--- src/code/fd-stream.lisp:1.101	Mon Jun  7 18:10:11 2010
+++ src/code/fd-stream.lisp	Tue Jun 29 20:52:15 2010
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /project/cmucl/cvsroot/src/code/fd-stream.lisp,v 1.101 2010-06-07 22:10:11 rtoy Exp $")
+  "$Header: /project/cmucl/cvsroot/src/code/fd-stream.lisp,v 1.102 2010-06-30 00:52:15 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -264,7 +264,20 @@
   ;; in-buffer-length, but could be less if we reached the
   ;; end-of-file.
   #+unicode
-  (in-length 0 :type index))
+  (in-length 0 :type index)
+  ;;
+  ;; Indicates how to handle errors when converting octets to
+  ;; characters.  If NIL, then the external format should handle it
+  ;; itself, doing whatever is deemed appropriate.  If non-NIL, this
+  ;; should be a function (or symbol) that the external format can
+  ;; funcall to deal with the error.
+  #+unicode
+  (octets-to-char-error nil)
+  ;;
+  ;; Like OCTETS-TO-CHAR-ERROR, but for converting characters to
+  ;; octets for output.
+  #+unicode
+  (char-to-octets-error nil))
 
 (defun %print-fd-stream (fd-stream stream depth)
   (declare (ignore depth) (stream stream))



More information about the cmucl-commit mailing list