[cmucl-cvs] CMUCL commit: RELEASE-20B-BRANCH src (3 files)

Raymond Toy rtoy at common-lisp.net
Wed Aug 4 12:08:26 UTC 2010


    Date: Wednesday, August 4, 2010 @ 08:08:24
  Author: rtoy
    Path: /project/cmucl/cvsroot/src
     Tag: RELEASE-20B-BRANCH

Modified: code/exports.lisp docs/cmu-user/unicode.tex
          general-info/release-20b.txt

Merge some changes from HEAD that we should have done before the 20b
pre1. 

code/exports.lisp:
o Export DESCRIBE-EXTERNAL-FORMAT


docs/cmu-user/unicode.tex:
o Update docs

general-info/release-20b.txt:
o Remove work-in-progress.


------------------------------+
 code/exports.lisp            |    3 +
 docs/cmu-user/unicode.tex    |   66 ++++++++++++++++++++++++++++++++++++-----
 general-info/release-20b.txt |    2 -
 3 files changed, 60 insertions(+), 11 deletions(-)


Index: src/code/exports.lisp
diff -u src/code/exports.lisp:1.299 src/code/exports.lisp:1.299.4.1
--- src/code/exports.lisp:1.299	Tue Jul 13 19:43:39 2010
+++ src/code/exports.lisp	Wed Aug  4 08:08:20 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/exports.lisp,v 1.299 2010-07-13 23:43:39 rtoy Exp $")
+  "$Header: /project/cmucl/cvsroot/src/code/exports.lisp,v 1.299.4.1 2010-08-04 12:08:20 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1489,6 +1489,7 @@
 		"DESCRIBE-EXTERNAL-FORMAT")
   ;; Unicode
   (:export "STRING-TO-OCTETS" "OCTETS-TO-STRING" "*DEFAULT-EXTERNAL-FORMAT*"
+	   "DESCRIBE-EXTERNAL-FORMATS"
 	   "LIST-ALL-EXTERNAL-FORMATS"
 	   "STRING-ENCODE" "STRING-DECODE"
 	   "SET-SYSTEM-EXTERNAL-FORMAT"))
Index: src/docs/cmu-user/unicode.tex
diff -u src/docs/cmu-user/unicode.tex:1.11 src/docs/cmu-user/unicode.tex:1.11.4.1
--- src/docs/cmu-user/unicode.tex:1.11	Mon Jul 12 09:58:42 2010
+++ src/docs/cmu-user/unicode.tex	Wed Aug  4 08:08:23 2010
@@ -80,14 +80,6 @@
 parameter to specify the format.  The default external format is
 \kwd{default}. 
 
-\begin{defun}{stream:}{set-system-external-format}{\var{terminal} \ampoptional{} \var{filenames}}
-  This function changes the external format used for
-  \var{*standard-input*}, \var{*standard-output*}, and
-  \var{*standard-error*} to the external format specified by
-  \var{terminal}.  Additionally, the Unix file name encoding can be
-  set to the value specified by \var{filenames} if non-\nil.
-\end{defun}
-
 \subsection{Available External Formats}
 
 The available external formats are listed below in
@@ -451,8 +443,66 @@
 \file{ext-formats:unidata.bin}.  If this file is not found, Unicode
 support is severely reduced; you can only use ASCII characters.
 
+\begin{defun}{}{open}{\args \var{filename} \amprest \var{options}
+    \keys{\kwd{direction} \kwd{element-type} \kwd{if-exists}
+      \kwd{if-does-not-exist} \morekeys \kwd{class} \kwd{mapped}
+      \kwd{input-handle} \kwd{output-handle}
+      \yetmorekeys \kwd{external-format} \kwd{decoding-error}
+      \kwd{encoding-error}}
+
+    The main options are covered elsewhere.  Here we describe the
+    options specific to Unicode.  The option \kwd{external-format}
+    specifies the external format to use for reading and writing the
+    file.  The external format is a keyword.
+
+    The options \kwd{decoding-error} and \kwd{encoding-error} are used
+    to specify how encoding and decoding errors are handled.  The
+    default value on \nil means the external format handles errors
+    itself and typically replaces invalid sequences with the Unicode
+    replacement character.
+
+    Otherwise, the value for \code{decoding-error} is either a
+    character, a symbol or a function.  If a character is
+    specified. it is used as the replacement character for any invalid
+    decoding.  If a symbol or a function is given, it must be a
+    function of three arguments: a message string to be printed, the
+    offending octet, and the number of octets read.  If the function
+    returns, it should return two values: the code point to use as the
+    replacement character and the number of octets read.  In addition,
+    \true{} may be specified.  This indicates that a continuable error
+    is signaled, which, if continued, the Unicode replacement
+    character is used.
+
+    For \code{encoding-error}, a character, symbol, or function can be
+    specified, like \code{decoding-error}, with the same meaning.  The
+    function, however, takes two arguments:  a format message string
+    and the incorrect codepoint.  If the function returns, it should
+    be the replacement codepoint.
+\end{defun}    
+      
 \subsubsection{Utilities}
 
+\begin{defun}{stream:}{set-system-external-format}{\var{terminal} \ampoptional{} \var{filenames}}
+  This function changes the external format used for
+  \var{*standard-input*}, \var{*standard-output*}, and
+  \var{*standard-error*} to the external format specified by
+  \var{terminal}.  Additionally, the Unix file name encoding can be
+  set to the value specified by \var{filenames} if non-\nil.
+\end{defun}
+
+\begin{defun}{extensions:}{list-all-external-formats}{}
+  list all of the vailable external formats.  A list is returned where
+  each element is a list of the external format name and a list of
+  aliases for the format.  No distinction is made between external
+  formats and composing external formats.
+\end{defun}
+
+\begin{defun}{extensions:}{describe-external-format}{external-format}
+  Print a description of the given \var{external-format}.  This may
+  cause the external format to be loaded (silently) if it is not
+  already loaded.
+\end{defun}
+
 Since strings are UTF-16 and hence may contain surrogate pairs, some
 utility functions are provided to make access easier.
 
Index: src/general-info/release-20b.txt
diff -u src/general-info/release-20b.txt:1.41 src/general-info/release-20b.txt:1.41.2.1
--- src/general-info/release-20b.txt:1.41	Sat Jul 31 09:45:33 2010
+++ src/general-info/release-20b.txt	Wed Aug  4 08:08:23 2010
@@ -1,7 +1,5 @@
 ========================== C M U C L  20 b =============================
 
-[--- WORK IN PROGRESS ---]
-
 The CMUCL project is pleased to announce the release of CMUCL 20b.
 This is a major release which contains numerous enhancements and
 bug fixes from the 19f release.




More information about the cmucl-cvs mailing list