From f93376996a79f25015673e85a86f56222e7d3882 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Wed, 30 Jun 2010 00:52:15 +0000
Subject: [PATCH] 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.
---
 code/fd-stream.lisp | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/code/fd-stream.lisp b/code/fd-stream.lisp
index dc8c1d71f..7c53b324e 100644
--- a/code/fd-stream.lisp
+++ b/code/fd-stream.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.101 2010/06/07 22:10:11 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/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))
-- 
GitLab