This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


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

Patch: PR 301


I'm checking in this fix from Oskar.
It is going into Classpath as well.

2000-08-04  Tom Tromey  <tromey@cygnus.com>

	* java/io/StreamTokenizer.java (TT_NONE): Now private.
	(nextToken): Handle backslashed newline.  From Oskar Liljeblad.
	For PR java.io/301.

Tom

Index: java/io/StreamTokenizer.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/io/StreamTokenizer.java,v
retrieving revision 1.5
diff -u -r1.5 StreamTokenizer.java
--- StreamTokenizer.java	2000/07/23 17:52:13	1.5
+++ StreamTokenizer.java	2000/08/06 00:46:22
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999  Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -37,7 +37,7 @@
   public static final int TT_WORD = -3;
 
   /** A constant indicating that no tokens have been read yet. */
-  public static final int TT_NONE = -4;
+  private static final int TT_NONE = -4;
 
   /**
    * Contains the type of the token read resulting from a call to nextToken
@@ -364,6 +364,10 @@
 		  case 't':	ch = '\t';
 		    break;
 		  case 'v':	ch = 0xB;
+		    break;
+		  case '\n':    ch = '\n';
+		    break;
+                  case '\r':    ch = '\r';
 		    break;
 		  case '\"':
 		  case '\'':

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