From: Nikodemus Siivola Date: Sun, 15 May 2005 12:49:16 +0000 (+0000) Subject: 0.9.0.32: "ASCII by any other name" X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=637495a7d041887ffe10f6b740574df65ae88c98;p=sbcl.git 0.9.0.32: "ASCII by any other name" * Solaris nl_langinfo calls ASCII "646", so add the aliases for :ISO-646, :ISO-646-US, and :|646|; restores Solaris buildabilty. ...now there's still failing tests though: backtrace issues and the compiler is losing type information... --- diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index 37a8a44..caa363d 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -950,6 +950,7 @@ (return-from fd-stream-resync (funcall (symbol-function (eighth entry)) stream))))) +;;; FIXME: OAOOM here vrt. *EXTERNAL-FORMAT-FUNCTIONS* in fd-stream.lisp (defmacro define-external-format (external-format size output-restart out-expr in-expr) (let* ((name (first external-format)) @@ -1198,7 +1199,8 @@ (setf (sap-ref-8 sap tail) bits)) (code-char byte)) -(define-external-format (:ascii :us-ascii :ansi_x3.4-1968) +(define-external-format (:ascii :us-ascii :ansi_x3.4-1968 + :iso-646 :iso-646-us :|646|) 1 t (if (>= bits 128) (stream-encoding-error-and-handle stream bits) @@ -1342,23 +1344,29 @@ (when (and character-stream-p (eq (fd-stream-external-format fd-stream) :default)) + (/show0 "/getting default external format") (setf (fd-stream-external-format fd-stream) - (intern (or (alien-funcall - (extern-alien "nl_langinfo" - (function c-string int)) - sb!unix:codeset) - "LATIN-1") - "KEYWORD")) + (default-external-format)) + (/show0 "cold-printing defaulted external-format:") + #!+sb-show + (cold-print (fd-stream-external-format fd-stream)) + (/show0 "matching to known aliases") (dolist (entry *external-formats* (restart-case - (error "Invalid external-format ~A" - (fd-stream-external-format fd-stream)) + (error "Invalid external-format ~A" + (fd-stream-external-format fd-stream)) (use-default () - :report "Set external format to LATIN-1" - (setf (fd-stream-external-format fd-stream) :latin-1)))) + :report "Set external format to LATIN-1" + (setf (fd-stream-external-format fd-stream) :latin-1)))) + (/show0 "cold printing known aliases:") + #!+sb-show + (dolist (alias (first entry)) (cold-print alias)) + (/show0 "done cold-printing known aliases") (when (member (fd-stream-external-format fd-stream) (first entry)) - (return)))) - + (/show0 "matched") + (return))) + (/show0 "/default external format ok")) + (when input-p (multiple-value-bind (routine type size read-n-characters normalized-external-format) diff --git a/src/code/octets.lisp b/src/code/octets.lisp index 943cd38..146f425 100644 --- a/src/code/octets.lisp +++ b/src/code/octets.lisp @@ -637,8 +637,9 @@ one-past-the-end" "LATIN-1") "KEYWORD")) +;;; FIXME: OAOOM here vrt. DEFINE-EXTERNAL-FORMAT in fd-stream.lisp (defparameter *external-format-functions* - '(((:ascii :us-ascii :ansi_x3.4-1968) + '(((:ascii :us-ascii :ansi_x3.4-1968 :iso-646 :iso-646-us :|646|) ascii->string-aref string->ascii) ((:latin1 :latin-1 :iso-8859-1) latin1->string-aref string->latin1) diff --git a/version.lisp-expr b/version.lisp-expr index 1f49538..0426e99 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.0.31" +"0.9.0.32"