From: Chris Hanson Date: Tue, 30 Mar 2004 04:27:52 +0000 (+0000) Subject: New port abstraction is hiding unread characters from the underlying X-Git-Tag: 20090517-FFI~1654 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c53d88b5cf532983c54595d5bba5d66f3c4af97f;p=mit-scheme.git New port abstraction is hiding unread characters from the underlying port operations; consequently, the buffer-input implementation was returning the wrong value for the current mark. This has been kludged around. --- diff --git a/v7/src/edwin/bufinp.scm b/v7/src/edwin/bufinp.scm index 1c63073dc..783d7dac1 100644 --- a/v7/src/edwin/bufinp.scm +++ b/v7/src/edwin/bufinp.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: bufinp.scm,v 1.12 2004/02/16 05:42:49 cph Exp $ +$Id: bufinp.scm,v 1.13 2004/03/30 04:27:48 cph Exp $ Copyright 1989,1990,1991,1999,2004 Massachusetts Institute of Technology @@ -71,7 +71,9 @@ USA. ,(lambda (port) (let ((state (port/state port))) (make-mark (bstate-group state) - (bstate-start state))))) + (if (port/unread port) + (- (bstate-start state) 1) + (bstate-start state)))))) (CHAR-READY? ,(lambda (port) (let ((state (port/state port))) diff --git a/v7/src/edwin/edwin.pkg b/v7/src/edwin/edwin.pkg index ecb7ac26f..253d3b450 100644 --- a/v7/src/edwin/edwin.pkg +++ b/v7/src/edwin/edwin.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: edwin.pkg,v 1.287 2004/02/16 05:43:26 cph Exp $ +$Id: edwin.pkg,v 1.288 2004/03/30 04:27:52 cph Exp $ Copyright 1989,1990,1991,1992,1993,1994 Massachusetts Institute of Technology Copyright 1995,1996,1997,1998,1999,2000 Massachusetts Institute of Technology @@ -535,7 +535,9 @@ USA. (export (edwin) make-buffer-input-port with-input-from-mark - with-input-from-region)) + with-input-from-region) + (import (runtime port) + port/unread)) (define-package (edwin buffer-output-port) (files "bufout")