diff --git a/ChangeLog b/ChangeLog index 09057efae..17a2803ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Sep 26 14:37:52 2001 Owen Taylor + + * glib/gen-unicode-tables.pl glib/guniprop.c + glib/{gunibreak,gunichartables,gunidecomp}.h: + Patch from Andrew Taylor to make much of the unicode + table data const so that it can be made read-only + and shared. + Wed Sep 26 12:41:05 2001 Owen Taylor * glib/gstrfuncs.c (g_strdup_vprintf): Copy if diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 09057efae..17a2803ee 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Wed Sep 26 14:37:52 2001 Owen Taylor + + * glib/gen-unicode-tables.pl glib/guniprop.c + glib/{gunibreak,gunichartables,gunidecomp}.h: + Patch from Andrew Taylor to make much of the unicode + table data const so that it can be made read-only + and shared. + Wed Sep 26 12:41:05 2001 Owen Taylor * glib/gstrfuncs.c (g_strdup_vprintf): Copy if diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 09057efae..17a2803ee 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Wed Sep 26 14:37:52 2001 Owen Taylor + + * glib/gen-unicode-tables.pl glib/guniprop.c + glib/{gunibreak,gunichartables,gunidecomp}.h: + Patch from Andrew Taylor to make much of the unicode + table data const so that it can be made read-only + and shared. + Wed Sep 26 12:41:05 2001 Owen Taylor * glib/gstrfuncs.c (g_strdup_vprintf): Copy if diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 09057efae..17a2803ee 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,11 @@ +Wed Sep 26 14:37:52 2001 Owen Taylor + + * glib/gen-unicode-tables.pl glib/guniprop.c + glib/{gunibreak,gunichartables,gunidecomp}.h: + Patch from Andrew Taylor to make much of the unicode + table data const so that it can be made read-only + and shared. + Wed Sep 26 12:41:05 2001 Owen Taylor * glib/gstrfuncs.c (g_strdup_vprintf): Copy if diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 09057efae..17a2803ee 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Wed Sep 26 14:37:52 2001 Owen Taylor + + * glib/gen-unicode-tables.pl glib/guniprop.c + glib/{gunibreak,gunichartables,gunidecomp}.h: + Patch from Andrew Taylor to make much of the unicode + table data const so that it can be made read-only + and shared. + Wed Sep 26 12:41:05 2001 Owen Taylor * glib/gstrfuncs.c (g_strdup_vprintf): Copy if diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 09057efae..17a2803ee 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Wed Sep 26 14:37:52 2001 Owen Taylor + + * glib/gen-unicode-tables.pl glib/guniprop.c + glib/{gunibreak,gunichartables,gunidecomp}.h: + Patch from Andrew Taylor to make much of the unicode + table data const so that it can be made read-only + and shared. + Wed Sep 26 12:41:05 2001 Owen Taylor * glib/gstrfuncs.c (g_strdup_vprintf): Copy if diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 09057efae..17a2803ee 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Wed Sep 26 14:37:52 2001 Owen Taylor + + * glib/gen-unicode-tables.pl glib/guniprop.c + glib/{gunibreak,gunichartables,gunidecomp}.h: + Patch from Andrew Taylor to make much of the unicode + table data const so that it can be made read-only + and shared. + Wed Sep 26 12:41:05 2001 Owen Taylor * glib/gstrfuncs.c (g_strdup_vprintf): Copy if diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 09057efae..17a2803ee 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Wed Sep 26 14:37:52 2001 Owen Taylor + + * glib/gen-unicode-tables.pl glib/guniprop.c + glib/{gunibreak,gunichartables,gunidecomp}.h: + Patch from Andrew Taylor to make much of the unicode + table data const so that it can be made read-only + and shared. + Wed Sep 26 12:41:05 2001 Owen Taylor * glib/gstrfuncs.c (g_strdup_vprintf): Copy if diff --git a/glib/gen-unicode-tables.pl b/glib/gen-unicode-tables.pl index 920492493..47423b2d4 100755 --- a/glib/gen-unicode-tables.pl +++ b/glib/gen-unicode-tables.pl @@ -531,7 +531,7 @@ sub print_tables 'page', \&fetch_type); } - print OUT "static char *type_table[256] = {\n"; + print OUT "static const char *type_table[256] = {\n"; for ($count = 0; $count <= $last; $count += 256) { print OUT ",\n" if $count > 0; @@ -550,7 +550,7 @@ sub print_tables $row[$count / 256] = &print_row ($count, '', 'unsigned short', 2, 'attrpage', \&fetch_attr); } - print OUT "static unsigned short *attr_table[256] = {\n"; + print OUT "static const unsigned short *attr_table[256] = {\n"; for ($count = 0; $count <= $last; $count += 256) { print OUT ",\n" if $count > 0; @@ -564,7 +564,7 @@ sub print_tables # # FIXME: type. - print OUT "static unsigned short title_table[][3] = {\n"; + print OUT "static const unsigned short title_table[][3] = {\n"; my ($item); my ($first) = 1; foreach $item (sort keys %title_to_lower) @@ -634,7 +634,7 @@ sub print_row return $def_pfx . $values[0]; } - printf OUT "static %s %s%d[256] = {\n ", $typname, $name, $start / 256; + printf OUT "static const %s %s%d[256] = {\n ", $typname, $name, $start / 256; my ($column) = 2; for ($i = $start; $i < $start + 256; ++$i) { @@ -682,7 +682,7 @@ sub print_decomp \&fetch_cclass); } - print OUT "static unsigned char *combining_class_table[256] = {\n"; + print OUT "static const unsigned char *combining_class_table[256] = {\n"; for ($count = 0; $count <= $last; $count += 256) { print OUT ",\n" if $count > 0; @@ -699,7 +699,7 @@ sub print_decomp print OUT " unsigned char *expansion;\n"; print OUT "} decomposition;\n\n"; - print OUT "static decomposition decomp_table[] =\n{\n"; + print OUT "static const decomposition decomp_table[] =\n{\n"; my ($iter); my ($first) = 1; for ($count = 0; $count <= $last; ++$count) @@ -783,7 +783,7 @@ sub print_line_break \&fetch_break_type); } - print OUT "static char *break_property_table[256] = {\n"; + print OUT "static const char *break_property_table[256] = {\n"; for ($count = 0; $count <= $last; $count += 256) { print OUT ",\n" if $count > 0; @@ -892,7 +892,7 @@ sub output_special_case_table * other than the case of the codepoint, in the order [Ll],[Lu],[Lt], * separated and terminated by a double NUL. */ -static guchar special_case_table[][$special_case_len] = { +static const guchar special_case_table[][$special_case_len] = { EOT for $case (@special_cases) { @@ -1046,7 +1046,7 @@ sub output_composition_table sub { exists $vals{$_[0]} ? $vals{$_[0]} : 0; }); } - print OUT "static unsigned short *compose_table[256] = {\n"; + print OUT "static const unsigned short *compose_table[256] = {\n"; for (my $count = 0; $count <= $last; $count += 256) { print OUT ",\n" if $count > 0; @@ -1057,7 +1057,7 @@ sub output_composition_table # Output first singletons - print OUT "static gushort compose_first_single[][2] = {\n"; + print OUT "static const gushort compose_first_single[][2] = {\n"; $i = 0; for $record (@first_singletons) { print OUT ",\n" if $i++ > 0; @@ -1069,7 +1069,7 @@ sub output_composition_table # Output second singletons - print OUT "static gushort compose_second_single[][2] = {\n"; + print OUT "static const gushort compose_second_single[][2] = {\n"; $i = 0; for $record (@second_singletons) { print OUT ",\n" if $i++ > 0; @@ -1082,7 +1082,7 @@ sub output_composition_table # Output array of composition pairs print OUT <> 8, c & 0xff); if (val >= 0xd800 && val < 0xdc00) { - guchar *p = special_case_table[val - 0xd800]; + const guchar *p = special_case_table[val - 0xd800]; return p[0] * 256 + p[1]; } else @@ -397,7 +397,7 @@ g_unichar_tolower (gunichar c) gunichar val = ATTTABLE (c >> 8, c & 0xff); if (val >= 0xd800 && val < 0xdc00) { - guchar *p = special_case_table[val - 0xd800]; + const guchar *p = special_case_table[val - 0xd800]; return p[0] * 256 + p[1]; } else @@ -562,7 +562,7 @@ output_special_case (gchar *out_buffer, int type, int which) { - guchar *p = special_case_table[index]; + const guchar *p = special_case_table[index]; if (type != G_UNICODE_TITLECASE_LETTER) p += 2; /* +2 to skip over "best single match" */