From dac333399ac6e6f0f10cfbba4d6f32c3651e0518 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Sat, 3 Jul 2010 13:42:52 +0000
Subject: [PATCH] o Add declaration to get rid of a compiler note. o SURROGATEP
 is not exported from LISP.

---
 pcl/simple-streams/external-formats/utf-32-be.lisp | 5 +++--
 pcl/simple-streams/external-formats/utf-32-le.lisp | 5 +++--
 pcl/simple-streams/external-formats/utf-32.lisp    | 5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/pcl/simple-streams/external-formats/utf-32-be.lisp b/pcl/simple-streams/external-formats/utf-32-be.lisp
index f1b6ccf75..9899918d5 100644
--- a/pcl/simple-streams/external-formats/utf-32-be.lisp
+++ b/pcl/simple-streams/external-formats/utf-32-be.lisp
@@ -4,7 +4,7 @@
 ;;; This code was written by Raymond Toy and has been placed in the public
 ;;; 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")
 
@@ -36,6 +36,7 @@
 
   (code-to-octets (code state output error c i)
     `(flet ((out (,c)
+	      (declare (type (unsigned-byte 32) ,c))
 	      ;; Big-endian output
 	      (dotimes (,i 4)
 		(,output (ldb (byte 8 (* 8 (- 3 ,i))) ,c)))))
@@ -43,7 +44,7 @@
        (unless ,state
 	 (out #xFEFF)
 	 (setf ,state t))
-       (cond ((lisp:surrogatep ,code)
+       (cond ((lisp::surrogatep ,code)
 	      (out (if ,error
 		       (funcall ,error "Surrogate code #x~4,0X is illegal for UTF32 output"
 				,code)
diff --git a/pcl/simple-streams/external-formats/utf-32-le.lisp b/pcl/simple-streams/external-formats/utf-32-le.lisp
index 97ba5fa7d..84f87e019 100644
--- a/pcl/simple-streams/external-formats/utf-32-le.lisp
+++ b/pcl/simple-streams/external-formats/utf-32-le.lisp
@@ -4,7 +4,7 @@
 ;;; This code was written by Raymond Toy and has been placed in the public
 ;;; 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")
 
@@ -37,10 +37,11 @@
 
   (code-to-octets (code state output error c i)
     `(flet ((out (,c)
+	      (declare (type (unsigned-byte 32) ,c))
 	      ;; Little-endian output
 	      (dotimes (,i 4)
 		(,output (ldb (byte 8 (* 8 ,i)) ,c)))))
-       (cond ((lisp:surrogatep ,code)
+       (cond ((lisp::surrogatep ,code)
 	      (out (if ,error
 		       (funcall ,error "Surrogate code #x~4,0X is illegal for UTF32 output"
 				,code)
diff --git a/pcl/simple-streams/external-formats/utf-32.lisp b/pcl/simple-streams/external-formats/utf-32.lisp
index def56b81b..d55a7319f 100644
--- a/pcl/simple-streams/external-formats/utf-32.lisp
+++ b/pcl/simple-streams/external-formats/utf-32.lisp
@@ -4,7 +4,7 @@
 ;;; This code was written by Raymond Toy and has been placed in the public
 ;;; 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")
 
@@ -78,6 +78,7 @@
 
   (code-to-octets (code state output error i c)
     `(flet ((out (,c)
+	      (declare (type (unsigned-byte 32) ,c))
 	      ;; Big-endian output
 	      (dotimes (,i 4)
 		(,output (ldb (byte 8 (* 8 (- 3 ,i))) ,c)))))
@@ -85,7 +86,7 @@
        (unless ,state
 	 (out #xFEFF)
 	 (setf ,state t))
-       (cond ((lisp:surrogatep ,code)
+       (cond ((lisp::surrogatep ,code)
 	      (out (if ,error
 		       (funcall ,error "Surrogate code #x~4,0X is illegal for UTF32 output"
 				,code)
-- 
GitLab