Skip to content
Snippets Groups Projects
Commit dac33339 authored by rtoy's avatar rtoy
Browse files

o Add declaration to get rid of a compiler note.

o SURROGATEP is not exported from LISP.
parent 6afe1d62
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;;; This code was written by Raymond Toy and has been placed in the public ;;; This code was written by Raymond Toy and has been placed in the public
;;; domain. ;;; domain.
;;; ;;;
(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/utf-32-be.lisp,v 1.5 2010/07/02 23:13:11 rtoy Exp $") (ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/utf-32-be.lisp,v 1.6 2010/07/03 13:42:52 rtoy Exp $")
(in-package "STREAM") (in-package "STREAM")
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
(code-to-octets (code state output error c i) (code-to-octets (code state output error c i)
`(flet ((out (,c) `(flet ((out (,c)
(declare (type (unsigned-byte 32) ,c))
;; Big-endian output ;; Big-endian output
(dotimes (,i 4) (dotimes (,i 4)
(,output (ldb (byte 8 (* 8 (- 3 ,i))) ,c))))) (,output (ldb (byte 8 (* 8 (- 3 ,i))) ,c)))))
...@@ -43,7 +44,7 @@ ...@@ -43,7 +44,7 @@
(unless ,state (unless ,state
(out #xFEFF) (out #xFEFF)
(setf ,state t)) (setf ,state t))
(cond ((lisp:surrogatep ,code) (cond ((lisp::surrogatep ,code)
(out (if ,error (out (if ,error
(funcall ,error "Surrogate code #x~4,0X is illegal for UTF32 output" (funcall ,error "Surrogate code #x~4,0X is illegal for UTF32 output"
,code) ,code)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;;; This code was written by Raymond Toy and has been placed in the public ;;; This code was written by Raymond Toy and has been placed in the public
;;; domain. ;;; domain.
;;; ;;;
(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/utf-32-le.lisp,v 1.5 2010/07/02 23:13:12 rtoy Exp $") (ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/utf-32-le.lisp,v 1.6 2010/07/03 13:42:52 rtoy Exp $")
(in-package "STREAM") (in-package "STREAM")
...@@ -37,10 +37,11 @@ ...@@ -37,10 +37,11 @@
(code-to-octets (code state output error c i) (code-to-octets (code state output error c i)
`(flet ((out (,c) `(flet ((out (,c)
(declare (type (unsigned-byte 32) ,c))
;; Little-endian output ;; Little-endian output
(dotimes (,i 4) (dotimes (,i 4)
(,output (ldb (byte 8 (* 8 ,i)) ,c))))) (,output (ldb (byte 8 (* 8 ,i)) ,c)))))
(cond ((lisp:surrogatep ,code) (cond ((lisp::surrogatep ,code)
(out (if ,error (out (if ,error
(funcall ,error "Surrogate code #x~4,0X is illegal for UTF32 output" (funcall ,error "Surrogate code #x~4,0X is illegal for UTF32 output"
,code) ,code)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;;; This code was written by Raymond Toy and has been placed in the public ;;; This code was written by Raymond Toy and has been placed in the public
;;; domain. ;;; domain.
;;; ;;;
(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/utf-32.lisp,v 1.7 2010/07/02 23:13:12 rtoy Exp $") (ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/utf-32.lisp,v 1.8 2010/07/03 13:42:52 rtoy Exp $")
(in-package "STREAM") (in-package "STREAM")
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
(code-to-octets (code state output error i c) (code-to-octets (code state output error i c)
`(flet ((out (,c) `(flet ((out (,c)
(declare (type (unsigned-byte 32) ,c))
;; Big-endian output ;; Big-endian output
(dotimes (,i 4) (dotimes (,i 4)
(,output (ldb (byte 8 (* 8 (- 3 ,i))) ,c))))) (,output (ldb (byte 8 (* 8 (- 3 ,i))) ,c)))))
...@@ -85,7 +86,7 @@ ...@@ -85,7 +86,7 @@
(unless ,state (unless ,state
(out #xFEFF) (out #xFEFF)
(setf ,state t)) (setf ,state t))
(cond ((lisp:surrogatep ,code) (cond ((lisp::surrogatep ,code)
(out (if ,error (out (if ,error
(funcall ,error "Surrogate code #x~4,0X is illegal for UTF32 output" (funcall ,error "Surrogate code #x~4,0X is illegal for UTF32 output"
,code) ,code)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment