scsh-users
[Top] [All Lists]

bug in scsh 0.4.3

To: scsh-bugs@martigny.ai.mit.edu
Subject: bug in scsh 0.4.3
From: "Jin S. Choi" <jsc@atype.com>
Date: Wed, 16 Oct 1996 12:06:03 -0400
Reply-to: jin@atype.com
The peek character of an fdport doesn't get reset to #f when
read_fdport_substring() is called. Here's an example.

The first line of the opened file begins "(define".


tabitha% scsh
Scsh 0.4
> (define ip (open-input-file "gscsh.scm"))
> (peek-char ip)
#\(
> (read-string 4 ip)
"(def"
> (peek-char ip)
#\(
> (read-string 4 ip)
"(ine"
> 

Here's a patch:

Index: fdports1.c
===================================================================
RCS file: /nfs/sw/scsh/scsh/scsh/fdports1.c,v
retrieving revision 1.8
diff -u -r1.8 fdports1.c
--- 1.8 1996/09/12 01:42:34
+++ fdports1.c  1996/10/16 15:56:55
@@ -395,6 +395,7 @@
        if( len > 0 ) {
            char *p = StrByte(buf,start);
            *p++ = EXTRACT_CHAR(peek);
+            *PortData_Peek(data) = SCHFALSE;
            return 1 + fread(p, 1, MIN(len-1, fbufcount(f)), f);
            }
        else return 0;

<Prev in Thread] Current Thread [Next in Thread>
  • bug in scsh 0.4.3, Jin S. Choi <=