summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2005-03-05 00:50:29 +0000
committerOwen Taylor <otaylor@src.gnome.org>2005-03-05 00:50:29 +0000
commit320f8cd2773015af4d3d1d5fb035c2ab11d5c921 (patch)
tree9b18fda40ede9bb4956297f1230d51e2cde8881a /modules
parenta0fac74e05f36a410256e581eca3ec8fd573195d (diff)
downloadpango-320f8cd2773015af4d3d1d5fb035c2ab11d5c921.tar.gz
Reduce non-shared data (#168899, inspired by patches from Tommi Komulainen
2005-03-04 Owen Taylor <otaylor@redhat.com> Reduce non-shared data (#168899, inspired by patches from Tommi Komulainen and Ross Burton) * pango/pango-color.c pango/pango-color-table.h tools/gen-color-table.pl: Redo storage of colors to use offsets into a static string rather than embedded strings. (Inspired by a patch from Tommi Komulainen, #168899) * pango/break.c pango/fonts.c pango/pango-color.c pango/pango-layout.c pango/pango-markup.c pango/pango-script-lang-table.h pango/mini-fribidi/fribidi_types.c tools/gen-script-for-lang.c: Add const in various places * modules/arabic/arabic-fc.c modules/hebrew/hebrew-fc.c: modules/indic/{indic-fc.c,indic-ot-class-tables.c, indic-ot.h} modules/syriac/syriac-ot.c (syriac): Further addition of const.
Diffstat (limited to 'modules')
-rw-r--r--modules/arabic/arabic-ot.c2
-rw-r--r--modules/hebrew/hebrew-fc.c2
-rw-r--r--modules/indic/indic-fc.c18
-rw-r--r--modules/indic/indic-ot-class-tables.c40
-rw-r--r--modules/indic/indic-ot.h22
-rw-r--r--modules/syriac/syriac-ot.c2
-rw-r--r--modules/thai/thai-fc.c8
7 files changed, 47 insertions, 47 deletions
diff --git a/modules/arabic/arabic-ot.c b/modules/arabic/arabic-ot.c
index d5fd89ea..ef667e68 100644
--- a/modules/arabic/arabic-ot.c
+++ b/modules/arabic/arabic-ot.c
@@ -33,7 +33,7 @@
*
*/
-joining_class arabic[] =
+static const joining_class arabic[] =
{
/* U+0620 */
none, none, right, right,
diff --git a/modules/hebrew/hebrew-fc.c b/modules/hebrew/hebrew-fc.c
index 5f6c1885..78b3cb9a 100644
--- a/modules/hebrew/hebrew-fc.c
+++ b/modules/hebrew/hebrew-fc.c
@@ -174,7 +174,7 @@ get_ruleset (FT_Face face)
{
PangoOTRuleset *ruleset;
static GQuark ruleset_quark = 0;
- static PangoOTTag hebr_tag = FT_MAKE_TAG ('h', 'e', 'b', 'r');
+ static const PangoOTTag hebr_tag = FT_MAKE_TAG ('h', 'e', 'b', 'r');
guint script_index;
PangoOTInfo *info = pango_ot_info_get (face);
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c
index b9816a21..c795a210 100644
--- a/modules/indic/indic-fc.c
+++ b/modules/indic/indic-fc.c
@@ -38,15 +38,15 @@ typedef PangoEngineShapeClass IndicEngineFcClass ; /* No extra fields needed */
struct _IndicEngineFc
{
PangoEngineShape shapeEngine;
- PangoIndicInfo *indicInfo;
+ const PangoIndicInfo *indicInfo;
};
struct _PangoIndicInfo
{
- PangoOTTag scriptTag;
- IndicOTClassTable *classTable;
- gchar *gsubQuarkName;
- gchar *gposQuarkName;
+ PangoOTTag scriptTag;
+ const IndicOTClassTable *classTable;
+ gchar *gsubQuarkName;
+ gchar *gposQuarkName;
};
#define ENGINE_SUFFIX "ScriptEngineFc"
@@ -122,7 +122,7 @@ static PangoEngineInfo script_engines[] = {
* in a macro that calls a body macro that can be redefined, or by
* putting the pointers to the PangoEngineInfo in PangoIndicInfo...
*/
-static PangoIndicInfo indic_info[] = {
+static const PangoIndicInfo indic_info[] = {
PANGO_INDIC_INFO(deva), PANGO_INDIC_INFO(beng), PANGO_INDIC_INFO(guru),
PANGO_INDIC_INFO(gujr), PANGO_INDIC_INFO(orya), PANGO_INDIC_INFO(taml),
PANGO_INDIC_INFO(telu), PANGO_INDIC_INFO(knda), PANGO_INDIC_INFO(mlym),
@@ -173,7 +173,7 @@ maybe_add_GPOS_feature (PangoOTRuleset *ruleset,
}
static PangoOTRuleset *
-get_gsub_ruleset (FT_Face face, PangoIndicInfo *indic_info)
+get_gsub_ruleset (FT_Face face, const PangoIndicInfo *indic_info)
{
PangoOTInfo *info = pango_ot_info_get (face);
GQuark ruleset_quark = g_quark_from_string (indic_info->gsubQuarkName);
@@ -217,7 +217,7 @@ get_gsub_ruleset (FT_Face face, PangoIndicInfo *indic_info)
static PangoOTRuleset *
-get_gpos_ruleset (FT_Face face, PangoIndicInfo *indic_info)
+get_gpos_ruleset (FT_Face face, const PangoIndicInfo *indic_info)
{
PangoOTInfo *info = pango_ot_info_get (face);
GQuark ruleset_quark = g_quark_from_string (indic_info->gposQuarkName);
@@ -319,7 +319,7 @@ indic_engine_shape (PangoEngineShape *engine,
PangoOTRuleset *gsub_ruleset = NULL, *gpos_ruleset = NULL;
PangoOTBuffer *buffer;
IndicEngineFc *indic_shape_engine = NULL;
- PangoIndicInfo *indic_info = NULL;
+ const PangoIndicInfo *indic_info = NULL;
PangoFcFont *fc_font;
MPreFixups *mprefixups;
diff --git a/modules/indic/indic-ot-class-tables.c b/modules/indic/indic-ot-class-tables.c
index 4f9a74b5..1a0321c8 100644
--- a/modules/indic/indic-ot-class-tables.c
+++ b/modules/indic/indic-ot-class-tables.c
@@ -71,7 +71,7 @@ enum
/*
* Character class tables
*/
-static IndicOTCharClass devaCharClasses[] =
+static const IndicOTCharClass devaCharClasses[] =
{
_xx, _ma, _ma, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, /* 0900 - 090F */
_iv, _iv, _iv, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, /* 0910 - 091F */
@@ -88,7 +88,7 @@ static IndicOTCharClass devaCharClasses[] =
* right behavior for the sequences "a halant ya aa" and
* "e halant ya aa".
*/
-static IndicOTCharClass bengCharClasses[] =
+static const IndicOTCharClass bengCharClasses[] =
{
_xx, _ma, _mp, _mp, _xx, _ct, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _ct, /* 0980 - 098F */
_iv, _xx, _xx, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, /* 0990 - 099F */
@@ -100,7 +100,7 @@ static IndicOTCharClass bengCharClasses[] =
_ct, _ct, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx /* 09F0 - 09FA */
};
-static IndicOTCharClass guruCharClasses[] =
+static const IndicOTCharClass guruCharClasses[] =
{
_xx, _ma, _ma, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _xx, _xx, _iv, /* 0A00 - 0A0F */
_iv, _xx, _xx, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, /* 0A10 - 0A1F */
@@ -112,7 +112,7 @@ static IndicOTCharClass guruCharClasses[] =
_ma, _ma, _ct, _ct, _xx /* 0A70 - 0A74 */
};
-static IndicOTCharClass gujrCharClasses[] =
+static const IndicOTCharClass gujrCharClasses[] =
{
_xx, _ma, _ma, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, _xx, _iv, /* 0A80 - 0A8F */
_iv, _iv, _xx, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, /* 0A90 - 0A9F */
@@ -123,7 +123,7 @@ static IndicOTCharClass gujrCharClasses[] =
_iv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx /* 0AE0 - 0AEF */
};
-static IndicOTCharClass oryaCharClasses[] =
+static const IndicOTCharClass oryaCharClasses[] =
{
_xx, _ma, _ma, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _iv, /* 0B00 - 0B0F */
_iv, _xx, _xx, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, /* 0B10 - 0B1F */
@@ -135,7 +135,7 @@ static IndicOTCharClass oryaCharClasses[] =
_xx /* 0B70 */
};
-static IndicOTCharClass tamlCharClasses[] =
+static const IndicOTCharClass tamlCharClasses[] =
{
_xx, _xx, _ma, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _xx, _iv, _iv, /* 0B80 - 0B8F */
_iv, _xx, _iv, _iv, _iv, _ct, _xx, _xx, _xx, _ct, _ct, _xx, _ct, _xx, _ct, _ct, /* 0B90 - 0B9F */
@@ -148,7 +148,7 @@ static IndicOTCharClass tamlCharClasses[] =
};
/* FIXME: Should some of the bb's be pb's? (KA, NA, MA, YA, VA, etc. (approx 13)) */
-static IndicOTCharClass teluCharClasses[] =
+static const IndicOTCharClass teluCharClasses[] =
{
_xx, _mp, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, _iv, /* 0C00 - 0C0F */
_iv, _xx, _iv, _iv, _iv, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, /* 0C10 - 0C1F */
@@ -167,7 +167,7 @@ static IndicOTCharClass teluCharClasses[] =
*
* http://brahmi.sourceforge.net/docs/KannadaComputing.html
*/
-static IndicOTCharClass kndaCharClasses[] =
+static const IndicOTCharClass kndaCharClasses[] =
{
_xx, _xx, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, /* 0C80 - 0C8F */
_iv, _xx, _iv, _iv, _iv, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, /* 0C90 - 0C9F */
@@ -182,7 +182,7 @@ static IndicOTCharClass kndaCharClasses[] =
* FIXME: this is correct for old-style Malayalam (MAL) but not for reformed Malayalam (MLR)
* FIXME: should there be a REPH for old-style Malayalam?
*/
-static IndicOTCharClass mlymCharClasses[] =
+static const IndicOTCharClass mlymCharClasses[] =
{
_xx, _xx, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, _iv, /* 0D00 - 0D0F */
_iv, _xx, _iv, _iv, _iv, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _bb, /* 0D10 - 0D1F */
@@ -193,7 +193,7 @@ static IndicOTCharClass mlymCharClasses[] =
_iv, _iv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx /* 0D60 - 0D6F */
};
-static IndicOTCharClass sinhCharClasses[] =
+static const IndicOTCharClass sinhCharClasses[] =
{
_xx, _xx, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, /* 0D80 - 0D8F */
_iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _xx, _ct, _ct, _ct, _ct, _ct, _ct, /* 0D90 - 0D9F */
@@ -249,25 +249,25 @@ static const IndicOTSplitMatra sinhSplitTable[] = {{0x0DD9, 0x0DCA}, {0x0DD9, 0x
/*
* Indic Class Tables
*/
-IndicOTClassTable deva_class_table = {0x0900, 0x0970, 2, DEVA_SCRIPT_FLAGS, devaCharClasses, NULL};
+const IndicOTClassTable deva_class_table = {0x0900, 0x0970, 2, DEVA_SCRIPT_FLAGS, devaCharClasses, NULL};
-IndicOTClassTable beng_class_table = {0x0980, 0x09FA, 3, BENG_SCRIPT_FLAGS, bengCharClasses, bengSplitTable};
+const IndicOTClassTable beng_class_table = {0x0980, 0x09FA, 3, BENG_SCRIPT_FLAGS, bengCharClasses, bengSplitTable};
-IndicOTClassTable guru_class_table = {0x0A00, 0x0A74, 2, GURU_SCRIPT_FLAGS, guruCharClasses, NULL};
+const IndicOTClassTable guru_class_table = {0x0A00, 0x0A74, 2, GURU_SCRIPT_FLAGS, guruCharClasses, NULL};
-IndicOTClassTable gujr_class_table = {0x0A80, 0x0AEF, 2, GUJR_SCRIPT_FLAGS, gujrCharClasses, NULL};
+const IndicOTClassTable gujr_class_table = {0x0A80, 0x0AEF, 2, GUJR_SCRIPT_FLAGS, gujrCharClasses, NULL};
-IndicOTClassTable orya_class_table = {0x0B00, 0x0B70, 3, ORYA_SCRIPT_FLAGS, oryaCharClasses, oryaSplitTable};
+const IndicOTClassTable orya_class_table = {0x0B00, 0x0B70, 3, ORYA_SCRIPT_FLAGS, oryaCharClasses, oryaSplitTable};
-IndicOTClassTable taml_class_table = {0x0B80, 0x0BF2, 3, TAML_SCRIPT_FLAGS, tamlCharClasses, tamlSplitTable};
+const IndicOTClassTable taml_class_table = {0x0B80, 0x0BF2, 3, TAML_SCRIPT_FLAGS, tamlCharClasses, tamlSplitTable};
-IndicOTClassTable telu_class_table = {0x0C00, 0x0C6F, 3, TELU_SCRIPT_FLAGS, teluCharClasses, teluSplitTable};
+const IndicOTClassTable telu_class_table = {0x0C00, 0x0C6F, 3, TELU_SCRIPT_FLAGS, teluCharClasses, teluSplitTable};
-IndicOTClassTable knda_class_table = {0x0C80, 0x0CEF, 4, KNDA_SCRIPT_FLAGS, kndaCharClasses, kndaSplitTable};
+const IndicOTClassTable knda_class_table = {0x0C80, 0x0CEF, 4, KNDA_SCRIPT_FLAGS, kndaCharClasses, kndaSplitTable};
-IndicOTClassTable mlym_class_table = {0x0D00, 0x0D6F, 3, MLYM_SCRIPT_FLAGS, mlymCharClasses, mlymSplitTable};
+const IndicOTClassTable mlym_class_table = {0x0D00, 0x0D6F, 3, MLYM_SCRIPT_FLAGS, mlymCharClasses, mlymSplitTable};
-IndicOTClassTable sinh_class_table = {0x0D80, 0x0DF4, 3, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable};
+const IndicOTClassTable sinh_class_table = {0x0D80, 0x0DF4, 3, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable};
const IndicOTSplitMatra *indic_ot_get_split_matra(const IndicOTClassTable *class_table, IndicOTCharClass char_class)
{
diff --git a/modules/indic/indic-ot.h b/modules/indic/indic-ot.h
index 47ec64e4..d4c37a8b 100644
--- a/modules/indic/indic-ot.h
+++ b/modules/indic/indic-ot.h
@@ -204,23 +204,23 @@ struct _IndicOTClassTable
gunichar lastChar;
glong worstCaseExpansion;
IndicOTScriptFlags scriptFlags;
- IndicOTCharClass *charClasses;
+ const IndicOTCharClass *charClasses;
const IndicOTSplitMatra *splitMatraTable;
};
typedef struct _IndicOTClassTable IndicOTClassTable;
-extern IndicOTClassTable deva_class_table;
-extern IndicOTClassTable beng_class_table;
-extern IndicOTClassTable guru_class_table;
-extern IndicOTClassTable gujr_class_table;
-extern IndicOTClassTable orya_class_table;
-extern IndicOTClassTable taml_class_table;
-extern IndicOTClassTable telu_class_table;
-extern IndicOTClassTable knda_class_table;
-extern IndicOTClassTable mlym_class_table;
-extern IndicOTClassTable sinh_class_table;
+extern const IndicOTClassTable deva_class_table;
+extern const IndicOTClassTable beng_class_table;
+extern const IndicOTClassTable guru_class_table;
+extern const IndicOTClassTable gujr_class_table;
+extern const IndicOTClassTable orya_class_table;
+extern const IndicOTClassTable taml_class_table;
+extern const IndicOTClassTable telu_class_table;
+extern const IndicOTClassTable knda_class_table;
+extern const IndicOTClassTable mlym_class_table;
+extern const IndicOTClassTable sinh_class_table;
const IndicOTSplitMatra *indic_ot_get_split_matra(const IndicOTClassTable *class_table, IndicOTCharClass char_class);
diff --git a/modules/syriac/syriac-ot.c b/modules/syriac/syriac-ot.c
index 6de4aa13..6011932f 100644
--- a/modules/syriac/syriac-ot.c
+++ b/modules/syriac/syriac-ot.c
@@ -30,7 +30,7 @@
*
* All other characters are given the joining class `none'.
*/
-JoiningClass syriac[] =
+static const JoiningClass syriac[] =
{
/* U+0700 */
none, none, none, none,
diff --git a/modules/thai/thai-fc.c b/modules/thai/thai-fc.c
index cb77a0b0..444dd4f2 100644
--- a/modules/thai/thai-fc.c
+++ b/modules/thai/thai-fc.c
@@ -61,7 +61,7 @@ static PangoEngineInfo script_engines[] = {
/* TIS-to-Unicode glyph maps for characters 0x80-0xff
*/
-static int tis620_0[128] = {
+static const int tis620_0[128] = {
/**/ 0, 0, 0, 0, 0, 0, 0, 0,
/**/ 0, 0, 0, 0, 0, 0, 0, 0,
/**/ 0, 0, 0, 0, 0, 0, 0, 0,
@@ -80,7 +80,7 @@ static int tis620_0[128] = {
0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0, 0, 0, 0
};
-static int tis620_1[128] = {
+static const int tis620_1[128] = {
/**/ 0, 0, 0, 0xf88c, 0xf88f, 0xf892, 0xf895, 0xf898,
0xf88b, 0xf88e, 0xf891, 0xf894, 0xf897, 0, 0, 0xf899,
/**/ 0, 0, 0xf884, 0xf889, 0xf885, 0xf886, 0xf887, 0xf888,
@@ -99,7 +99,7 @@ static int tis620_1[128] = {
0x0e58, 0x0e59, 0, 0, 0, 0, 0, 0
};
-static int tis620_2[128] = {
+static const int tis620_2[128] = {
0xf700, 0xf701, 0xf702, 0xf703, 0xf704, 0x2026, 0xf705, 0xf706,
0xf707, 0xf708, 0xf709, 0xf70a, 0xf70b, 0xf70c, 0xf70d, 0xf70e,
0xf70f, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
@@ -118,7 +118,7 @@ static int tis620_2[128] = {
0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0xf718, 0xf719, 0xf71a, 0
};
-static int lao_0[128] = {
+static const int lao_0[128] = {
/**/ 0, 0, 0, 0, 0, 0, 0, 0,
/**/ 0, 0, 0, 0, 0, 0, 0, 0,
/**/ 0, 0, 0, 0, 0, 0, 0, 0,