X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fexternal-formats%2Fucs-2.lisp;h=fc1d4bd4546be63e5fcc79e71416935d58b6c4bf;hb=7effaab5d43dd5423938b00854848e01eb3a67c8;hp=4375114f03b9188d166afb16443a946a4b400bd0;hpb=01e9e8c568777d6480699e6cb3947f38c3bed350;p=sbcl.git diff --git a/src/code/external-formats/ucs-2.lisp b/src/code/external-formats/ucs-2.lisp index 4375114..fc1d4bd 100644 --- a/src/code/external-formats/ucs-2.lisp +++ b/src/code/external-formats/ucs-2.lisp @@ -36,11 +36,11 @@ ;;; ;;; Define external format: fd-stream ;;; -(define-external-format/variable-width (:ucs-2le :ucs2le) nil +(define-external-format/variable-width (:ucs-2le :ucs2le #!+win32 :ucs2 #!+win32 :ucs-2) nil 2 (if (< bits #x10000) (setf (sap-ref-16le sap tail) bits) - (stream-encoding-error-and-handle stream bits)) + (external-format-encoding-error stream bits)) 2 (code-char (sap-ref-16le sap head))) @@ -48,7 +48,7 @@ 2 (if (< bits #x10000) (setf (sap-ref-16be sap tail) bits) - (stream-encoding-error-and-handle stream bits)) + (external-format-encoding-error stream bits)) 2 (code-char (sap-ref-16be sap head))) @@ -209,10 +209,8 @@ (instantiate-octets-definition define-ucs-2->string) -(pushnew '((:ucs-2le :ucs2le) - ucs-2le->string-aref string->ucs-2le) - *external-format-functions*) +(add-external-format-funs '(:ucs-2le :ucs2le #!+win32 :ucs2 #!+win32 :ucs-2) + '(ucs-2le->string-aref string->ucs-2le)) -(pushnew '((:ucs-2be :ucs2be) - ucs-2be->string-aref string->ucs-2be) - *external-format-functions*) +(add-external-format-funs '(:ucs-2be :ucs2be) + '(ucs-2be->string-aref string->ucs-2be))