This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: read-line and CRLF


--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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]