This is the mail archive of the
kawa@sourceware.cygnus.com
mailing list for the Kawa project.
Re: read-line and CRLF
- To: kawa at sourceware dot cygnus dot com
- Subject: Re: read-line and CRLF
- From: brlewis at alum dot mit dot edu
- Date: Wed, 7 Jun 2000 14:41:50 -0400
- References: <200006062014.QAA21097@tux.eatonvance.com> <m21z2a1s4v.fsf@kelso.bo\
--text follows this line--
I think I've found the problem. My test cases pass with this patch:
Index: kawa/standard/read_line.java
===================================================================
RCS file: /cvs/kawa/kawa/kawa/standard/read_line.java,v
retrieving revision 1.3
diff -u -r1.3 read_line.java
--- read_line.java 1999/12/11 05:14:39 1.3
+++ read_line.java 2000/06/07 18:39:55
@@ -82,8 +82,8 @@
delim = 0;
if (ch == '\n')
delim = 1;
- else if (pos < limit)
- delim = buffer[pos] == '\n' ? 2 : 1;
+ else if (pos+1 < limit)
+ delim = buffer[pos+1] == '\n' ? 2 : 1;
else
break;
in.pos = pos + delim;