Size compose_table correctly. (#123421, Simon Josefsson)

2004-01-30  Noah Levitt  <nlevitt@columbia.edu>

	* glib/gunicomp.h:
	* glib/gunidecomp.c:
	* glib/gen-unicode-tables.pl: Size compose_table correctly. (#123421,
        Simon Josefsson)

	* glib/gen-unicode-tables.pl: Get rid of some new warnings from perl
	5.8.1.
This commit is contained in:
Noah Levitt 2004-01-30 23:20:16 +00:00 committed by Noah Levitt
parent e7b9ca87a2
commit 782188d539
9 changed files with 71 additions and 7 deletions

View File

@ -1,3 +1,13 @@
2004-01-30 Noah Levitt <nlevitt@columbia.edu>
* glib/gunicomp.h:
* glib/gunidecomp.c:
* glib/gen-unicode-tables.pl: Size compose_table correctly. (#123421,
Simon Josefsson)
* glib/gen-unicode-tables.pl: Get rid of some new warnings from perl
5.8.1.
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
* m4macros/glib-2.0.m4

View File

@ -1,3 +1,13 @@
2004-01-30 Noah Levitt <nlevitt@columbia.edu>
* glib/gunicomp.h:
* glib/gunidecomp.c:
* glib/gen-unicode-tables.pl: Size compose_table correctly. (#123421,
Simon Josefsson)
* glib/gen-unicode-tables.pl: Get rid of some new warnings from perl
5.8.1.
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
* m4macros/glib-2.0.m4

View File

@ -1,3 +1,13 @@
2004-01-30 Noah Levitt <nlevitt@columbia.edu>
* glib/gunicomp.h:
* glib/gunidecomp.c:
* glib/gen-unicode-tables.pl: Size compose_table correctly. (#123421,
Simon Josefsson)
* glib/gen-unicode-tables.pl: Get rid of some new warnings from perl
5.8.1.
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
* m4macros/glib-2.0.m4

View File

@ -1,3 +1,13 @@
2004-01-30 Noah Levitt <nlevitt@columbia.edu>
* glib/gunicomp.h:
* glib/gunidecomp.c:
* glib/gen-unicode-tables.pl: Size compose_table correctly. (#123421,
Simon Josefsson)
* glib/gen-unicode-tables.pl: Get rid of some new warnings from perl
5.8.1.
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
* m4macros/glib-2.0.m4

View File

@ -1,3 +1,13 @@
2004-01-30 Noah Levitt <nlevitt@columbia.edu>
* glib/gunicomp.h:
* glib/gunidecomp.c:
* glib/gen-unicode-tables.pl: Size compose_table correctly. (#123421,
Simon Josefsson)
* glib/gen-unicode-tables.pl: Get rid of some new warnings from perl
5.8.1.
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
* m4macros/glib-2.0.m4

View File

@ -1,3 +1,13 @@
2004-01-30 Noah Levitt <nlevitt@columbia.edu>
* glib/gunicomp.h:
* glib/gunidecomp.c:
* glib/gen-unicode-tables.pl: Size compose_table correctly. (#123421,
Simon Josefsson)
* glib/gen-unicode-tables.pl: Get rid of some new warnings from perl
5.8.1.
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
* m4macros/glib-2.0.m4

View File

@ -766,9 +766,10 @@ sub escape
{
my ($string) = @_;
$string =~ s/(\C)/sprintf "\\x%02x",ord($1)/eg;
my $escaped = unpack("H*", $string);
$escaped =~ s/(.{2})/\\x$1/g;
return $string;
return $escaped;
}
# Returns the offset of $decomp in the offset string. Updates the
@ -1204,6 +1205,8 @@ sub output_composition_table
$last = $code if $code > $last;
}
printf OUT "#define COMPOSE_TABLE_LAST %d\n\n", $last / 256;
# Output lookup table
my @row;
@ -1215,16 +1218,15 @@ sub output_composition_table
}
printf OUT "\n};\n\n";
print OUT "static const gint16 compose_table[256] = {\n";
print OUT "static const gint16 compose_table[COMPOSE_TABLE_LAST + 1] = {\n";
for (my $count = 0; $count <= $last; $count += 256)
{
print OUT ",\n" if $count > 0;
print OUT " ", $row[$count / 256];
$bytes_out += 2;
}
print OUT "\n};\n\n";
$bytes_out += 256 * 2;
# Output first singletons
print OUT "static const guint16 compose_first_single[][2] = {\n";

View File

@ -3,6 +3,8 @@
#define COMPOSE_SECOND_START 357
#define COMPOSE_SECOND_SINGLE_START 388
#define COMPOSE_TABLE_LAST 48
static const guint16 compose_data[][256] = {
{ /* page 0, index 0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -222,7 +224,7 @@ static const guint16 compose_data[][256] = {
}
};
static const gint16 compose_table[256] = {
static const gint16 compose_table[COMPOSE_TABLE_LAST + 1] = {
0 /* page 0 */,
1 /* page 1 */,
2 /* page 2 */,

View File

@ -281,7 +281,7 @@ combine_hangul (gunichar a,
: (compose_data[compose_table[Page]][Char]))
#define COMPOSE_INDEX(Char) \
(((Char) > (G_UNICODE_LAST_CHAR)) ? 0 : CI((Char) >> 8, (Char) & 0xff))
(((Char >> 8) > (COMPOSE_TABLE_LAST)) ? 0 : CI((Char) >> 8, (Char) & 0xff))
static gboolean
combine (gunichar a,