This is the mail archive of the
mailing list for the GCC project.
Patch: gen-table -vs- Unicode 3.1 (Was: Patch installed for gcc and java dir const-ification)
- From: Tom Tromey <tromey at redhat dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 28 Dec 2001 21:40:39 -0700
- Subject: Patch: gen-table -vs- Unicode 3.1 (Was: Patch installed for gcc and java dir const-ification)
- References: <200112280259.VAA25796@caip.rutgers.edu>
- Reply-to: tromey at redhat dot com
>>>>> "Kaveh" == Kaveh R Ghazi <firstname.lastname@example.org> writes:
Kaveh> Sure. But when I ran 3.0.1 through gen-table.pl the output was
Kaveh> vastly different from the old chartables.h. It had a whole
Kaveh> bunch of (char*)0 extra lines and somehow a parsing error got
Kaveh> inserted so it wouldn't compile. I think the gen-table.pl
Kaveh> script encounters some input that it didn't expect and doesn't
Kaveh> yield valid C code.
I looked into this.
gen-table doesn't expect any characters after \uffff, and the 3.0.1
tables include some entries in that range.
I'm checking in the appended.
from Tom Tromey <email@example.com>
* gen-table.pl: Don't process characters after \uffff. Added
comment pointing to input file.
RCS file: /cvs/gcc/gcc/gcc/java/gen-table.pl,v
retrieving revision 1.3
diff -u -r1.3 gen-table.pl
--- gen-table.pl 2001/12/28 22:27:29 1.3
+++ gen-table.pl 2001/12/29 02:15:40
@@ -1,6 +1,6 @@
-# Copyright (C) 2000 Free Software Foundation
+# Copyright (C) 2000, 2001 Free Software Foundation
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,10 +20,14 @@
# gen-table.pl - Generate tables for gcj from Unicode data.
# Usage: perl gen-table.pl DATA-FILE
-# A suitable DATA-FILE is available at:
+# You can find the Unicode data file here:
+# Please update this URL when this program is used with a more
+# recent version of the table. Note that this table cannot be
+# distributed with gcc.
+# This program should not be re-run indiscriminately. Care must be
+# taken that what it generates is in sync with the Java specification.
# Names of fields in Unicode data table.
$CODE = 0;
$NAME = 1;
@@ -80,6 +84,7 @@
$code = hex ($fields[$CODE]);
+ last if $code > 0xffff;
if ($code > $last_code + 1)
# Found a gap.