From 3c3f92d89ee3254a919894b03e5703cac9ec29c9 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Fri, 1 Jul 2005 14:54:41 +0000
Subject: [PATCH] FILE-POSITION on string input streams did not accept :START
 and :END for the position.  Add support.

Reported by Bruno Haible, cmucl-imp, 28 Jun 2005.
---
 code/stream.lisp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/code/stream.lisp b/code/stream.lisp
index dacd96733..ea5faafcd 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.80 2005/05/23 18:02:12 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/stream.lisp,v 1.81 2005/07/01 14:54:41 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1483,7 +1483,11 @@ output to Output-stream"
   (case operation
     (:file-position
      (if arg1
-	 (setf (string-input-stream-current stream) arg1)
+	 (setf (string-input-stream-current stream)
+	       (case arg1
+		 (:start 0)
+		 (:end (length (string-input-stream-string stream)))
+		 (t arg1)))
 	 (string-input-stream-current stream)))
     (:file-length
      (error 'type-error :datum stream :expected-type 'file-stream))
-- 
GitLab