mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-19 23:28:54 +02:00
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:
10
ChangeLog
10
ChangeLog
@@ -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>
|
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* m4macros/glib-2.0.m4
|
* m4macros/glib-2.0.m4
|
||||||
|
@@ -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>
|
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* m4macros/glib-2.0.m4
|
* m4macros/glib-2.0.m4
|
||||||
|
@@ -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>
|
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* m4macros/glib-2.0.m4
|
* m4macros/glib-2.0.m4
|
||||||
|
@@ -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>
|
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* m4macros/glib-2.0.m4
|
* m4macros/glib-2.0.m4
|
||||||
|
@@ -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>
|
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* m4macros/glib-2.0.m4
|
* m4macros/glib-2.0.m4
|
||||||
|
@@ -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>
|
Tue Jan 27 18:45:47 2004 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* m4macros/glib-2.0.m4
|
* m4macros/glib-2.0.m4
|
||||||
|
@@ -766,9 +766,10 @@ sub escape
|
|||||||
{
|
{
|
||||||
my ($string) = @_;
|
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
|
# Returns the offset of $decomp in the offset string. Updates the
|
||||||
@@ -1204,6 +1205,8 @@ sub output_composition_table
|
|||||||
$last = $code if $code > $last;
|
$last = $code if $code > $last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf OUT "#define COMPOSE_TABLE_LAST %d\n\n", $last / 256;
|
||||||
|
|
||||||
# Output lookup table
|
# Output lookup table
|
||||||
|
|
||||||
my @row;
|
my @row;
|
||||||
@@ -1215,16 +1218,15 @@ sub output_composition_table
|
|||||||
}
|
}
|
||||||
printf OUT "\n};\n\n";
|
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)
|
for (my $count = 0; $count <= $last; $count += 256)
|
||||||
{
|
{
|
||||||
print OUT ",\n" if $count > 0;
|
print OUT ",\n" if $count > 0;
|
||||||
print OUT " ", $row[$count / 256];
|
print OUT " ", $row[$count / 256];
|
||||||
|
$bytes_out += 2;
|
||||||
}
|
}
|
||||||
print OUT "\n};\n\n";
|
print OUT "\n};\n\n";
|
||||||
|
|
||||||
$bytes_out += 256 * 2;
|
|
||||||
|
|
||||||
# Output first singletons
|
# Output first singletons
|
||||||
|
|
||||||
print OUT "static const guint16 compose_first_single[][2] = {\n";
|
print OUT "static const guint16 compose_first_single[][2] = {\n";
|
||||||
|
@@ -3,6 +3,8 @@
|
|||||||
#define COMPOSE_SECOND_START 357
|
#define COMPOSE_SECOND_START 357
|
||||||
#define COMPOSE_SECOND_SINGLE_START 388
|
#define COMPOSE_SECOND_SINGLE_START 388
|
||||||
|
|
||||||
|
#define COMPOSE_TABLE_LAST 48
|
||||||
|
|
||||||
static const guint16 compose_data[][256] = {
|
static const guint16 compose_data[][256] = {
|
||||||
{ /* page 0, index 0 */
|
{ /* 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,
|
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 */,
|
0 /* page 0 */,
|
||||||
1 /* page 1 */,
|
1 /* page 1 */,
|
||||||
2 /* page 2 */,
|
2 /* page 2 */,
|
||||||
|
@@ -281,7 +281,7 @@ combine_hangul (gunichar a,
|
|||||||
: (compose_data[compose_table[Page]][Char]))
|
: (compose_data[compose_table[Page]][Char]))
|
||||||
|
|
||||||
#define COMPOSE_INDEX(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
|
static gboolean
|
||||||
combine (gunichar a,
|
combine (gunichar a,
|
||||||
|
Reference in New Issue
Block a user