From a3da0e22e8cf9b718b486203ce568507228f4d11 Mon Sep 17 00:00:00 2001 From: Rudi Schlatte Date: Fri, 13 Aug 2004 17:35:43 +0000 Subject: [PATCH] 0.8.13.60: Fix peek-char, make sb-simple-streams compile ... If this checkin is broken again, it's brown-paper-bag time, I guess --- contrib/sb-simple-streams/impl.lisp | 3 +- src/code/target-stream.lisp | 71 +++++++++++++++++------------------ version.lisp-expr | 2 +- 3 files changed, 37 insertions(+), 39 deletions(-) diff --git a/contrib/sb-simple-streams/impl.lisp b/contrib/sb-simple-streams/impl.lisp index 417c870..d5b709c 100644 --- a/contrib/sb-simple-streams/impl.lisp +++ b/contrib/sb-simple-streams/impl.lisp @@ -1019,8 +1019,7 @@ is supported only on simple-streams." File-Stream is open to. If the second argument is supplied, then this becomes the new file position. The second argument may also be :start or :end for the start and end of the file, respectively." - (declare (type (or index (alien sb!unix:off-t) (member nil :start :end)) - position)) + (declare (type (or sb-int:index (member nil :start :end)) position)) (etypecase stream (simple-stream (%file-position stream position)) diff --git a/src/code/target-stream.lisp b/src/code/target-stream.lisp index 5e7a689..d018739 100644 --- a/src/code/target-stream.lisp +++ b/src/code/target-stream.lisp @@ -25,42 +25,41 @@ ;;; SKIPPED-CHAR-FORM - the form to execute when skipping a character ;;; EOF-DETECTED-FORM - the form to execute when EOF has been detected ;;; (this will default to CHAR-VAR) -(eval-when (:compile-toplevel :execute) - (sb!xc:defmacro generalized-peeking-mechanism - (peek-type eof-value char-var read-form unread-form - &optional (skipped-char-form nil) (eof-detected-form nil)) - `(let ((,char-var ,read-form)) - (cond ((eql ,char-var ,eof-value) - ,(if eof-detected-form - eof-detected-form - char-var)) - ((characterp ,peek-type) - (do ((,char-var ,char-var ,read-form)) - ((or (eql ,char-var ,eof-value) - (char= ,char-var ,peek-type)) - (cond ((eql ,char-var ,eof-value) - ,(if eof-detected-form - eof-detected-form - char-var)) - (t ,unread-form - ,char-var))) - ,skipped-char-form)) - ((eql ,peek-type t) - (do ((,char-var ,char-var ,read-form)) - ((or (eql ,char-var ,eof-value) - (not (whitespacep ,char-var))) - (cond ((eql ,char-var ,eof-value) - ,(if eof-detected-form - eof-detected-form - char-var)) - (t ,unread-form - ,char-var))) - ,skipped-char-form)) - ((null ,peek-type) - ,unread-form - ,char-var) - (t - (bug "Impossible case reached in PEEK-CHAR")))))) +(sb!xc:defmacro generalized-peeking-mechanism + (peek-type eof-value char-var read-form unread-form + &optional (skipped-char-form nil) (eof-detected-form nil)) + `(let ((,char-var ,read-form)) + (cond ((eql ,char-var ,eof-value) + ,(if eof-detected-form + eof-detected-form + char-var)) + ((characterp ,peek-type) + (do ((,char-var ,char-var ,read-form)) + ((or (eql ,char-var ,eof-value) + (char= ,char-var ,peek-type)) + (cond ((eql ,char-var ,eof-value) + ,(if eof-detected-form + eof-detected-form + char-var)) + (t ,unread-form + ,char-var))) + ,skipped-char-form)) + ((eql ,peek-type t) + (do ((,char-var ,char-var ,read-form)) + ((or (eql ,char-var ,eof-value) + (not (whitespacep ,char-var))) + (cond ((eql ,char-var ,eof-value) + ,(if eof-detected-form + eof-detected-form + char-var)) + (t ,unread-form + ,char-var))) + ,skipped-char-form)) + ((null ,peek-type) + ,unread-form + ,char-var) + (t + (bug "Impossible case reached in PEEK-CHAR"))))) ;;; rudi (2004-08-09): There was an inline declaration for read-char, ;;; unread-char, read-byte, listen here that was removed because these diff --git a/version.lisp-expr b/version.lisp-expr index 83fd702..ae57742 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.13.59" +"0.8.13.60" -- 1.7.10.4