aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2003-11-16 21:15:55 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-11-16 21:15:55 +0000
commitedc6a9c48b7238308505927268cdbe9a4b2205db (patch)
tree58a267c3b704ed9a36dfc5d4f7a2ff1f14f78c16 /libjava
parentc988af2b8cb75ca28789f30a6bb650b38684cc0b (diff)
downloadgcc-edc6a9c48b7238308505927268cdbe9a4b2205db.zip
gcc-edc6a9c48b7238308505927268cdbe9a4b2205db.tar.gz
gcc-edc6a9c48b7238308505927268cdbe9a4b2205db.tar.bz2
re PR libgcj/13062 (StreamTokenizer ignores commentChar)
PR libgcj/13062: * java/io/StreamTokenizer.java (commentChar): Clear other attributes for character. (quoteChar): Likewise. From-SVN: r73653
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog7
-rw-r--r--libjava/java/io/StreamTokenizer.java22
2 files changed, 25 insertions, 4 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 96510a5..9a26ba1 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,10 @@
+2003-11-16 Tom Tromey <tromey@redhat.com>
+
+ PR libgcj/13062:
+ * java/io/StreamTokenizer.java (commentChar): Clear other
+ attributes for character.
+ (quoteChar): Likewise.
+
2003-11-14 Tom Fitzsimmons <fitzsim@redhat.com>
* java/awt/GridBagLayout.java (getLayoutDimensions): Return array of two
diff --git a/libjava/java/io/StreamTokenizer.java b/libjava/java/io/StreamTokenizer.java
index 94341fa..a77b699 100644
--- a/libjava/java/io/StreamTokenizer.java
+++ b/libjava/java/io/StreamTokenizer.java
@@ -1,5 +1,5 @@
/* StreamTokenizer.java -- parses streams of characters into tokens
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
This file is part of GNU Classpath.
@@ -167,14 +167,21 @@ public class StreamTokenizer
}
/**
- * This method sets the comment attribute on the specified character.
+ * This method sets the comment attribute on the specified
+ * character. Other attributes for the character are cleared.
*
* @param c The character to set the comment attribute for, passed as an int
*/
public void commentChar(int ch)
{
if (ch >= 0 && ch <= 255)
- comment[ch] = true;
+ {
+ comment[ch] = true;
+ whitespace[ch] = false;
+ alphabetic[ch] = false;
+ numeric[ch] = false;
+ quote[ch] = false;
+ }
}
/**
@@ -566,13 +573,20 @@ public class StreamTokenizer
/**
* This method sets the quote attribute on the specified character.
+ * Other attributes for the character are cleared.
*
* @param c The character to set the quote attribute for, passed as an int.
*/
public void quoteChar(int ch)
{
if (ch >= 0 && ch <= 255)
- quote[ch] = true;
+ {
+ quote[ch] = true;
+ comment[ch] = false;
+ whitespace[ch] = false;
+ alphabetic[ch] = false;
+ numeric[ch] = false;
+ }
}
/**