From 2b4cd98710a25a307fb56948ee5491d79a3c1222 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Mon, 9 Aug 2010 22:45:14 +0000
Subject: [PATCH] FILE-POSITION returned the wrong thing for Unicode.  The
 LISP-STREAM-MISC function takes care of computing the position, so
 FILE-POSITION doesn't need to do anything else.  (Why isn't this true for the
 non-unicode case?  Should we make it so?)

---
 code/stream.lisp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/code/stream.lisp b/code/stream.lisp
index 9847bca86..e80639314 100644
--- a/code/stream.lisp
+++ b/code/stream.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/stream.lisp,v 1.94 2010/07/05 03:40:02 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/stream.lisp,v 1.95 2010/08/09 22:45:14 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -364,8 +364,13 @@
       (t
        (let ((res (funcall (lisp-stream-misc stream) stream
 			   :file-position nil)))
+	 ;; For Unicode, the LISP-STREAM-MISC function handles
+	 ;; everything, so we can just return the result.
+	 #-unicode
 	 (when res
-	   (- res (- in-buffer-length (lisp-stream-in-index stream)))))))))
+	   (- res (- in-buffer-length (lisp-stream-in-index stream))))
+	 #+unicode
+	 res)))))
 
 
 ;;; File-Length  --  Public
-- 
GitLab