From 192927225c447a8eaba613838aff93f82dee41d0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 18 Nov 2009 09:26:24 -0500 Subject: [PATCH] [fc-glyphname] Rename internal arrays to prefix with _fc_ Although they were static, I was still surprised that gdb was seeing our variable "glyphs". Not helpful. --- fc-glyphname/fc-glyphname.c | 6 +++--- src/fcfreetype.c | 13 ++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/fc-glyphname/fc-glyphname.c b/fc-glyphname/fc-glyphname.c index 5788460..5e1e881 100644 --- a/fc-glyphname/fc-glyphname.c +++ b/fc-glyphname/fc-glyphname.c @@ -297,7 +297,7 @@ main (int argc, char **argv) * Dump out entries */ - printf ("static const struct { const FcChar32 ucs; const FcChar8 name[%d]; } glyphs[%d] = {\n", + printf ("static const struct { const FcChar32 ucs; const FcChar8 name[%d]; } _fc_glyph_names[%d] = {\n", max_name_len + 1, nraw); for (i = 0; i < nraw; i++) @@ -310,12 +310,12 @@ main (int argc, char **argv) * Dump out name_to_ucs table */ - dump (name_to_ucs, "name_to_ucs"); + dump (name_to_ucs, "_fc_name_to_ucs"); /* * Dump out ucs_to_name table */ - dump (ucs_to_name, "ucs_to_name"); + dump (ucs_to_name, "_fc_ucs_to_name"); while (fgets (line, sizeof (line), stdin)) fputs (line, stdout); diff --git a/src/fcfreetype.c b/src/fcfreetype.c index c30826e..68596f5 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -2326,10 +2326,10 @@ FcUcs4ToGlyphName (FcChar32 ucs4) int r = 0; FcGlyphId gn; - while ((gn = ucs_to_name[i]) != -1) + while ((gn = _fc_ucs_to_name[i]) != -1) { - if (glyphs[gn].ucs == ucs4) - return glyphs[gn].name; + if (_fc_glyph_names[gn].ucs == ucs4) + return _fc_glyph_names[gn].name; if (!r) { r = (int) (ucs4 % FC_GLYPHNAME_REHASH); @@ -2351,10 +2351,10 @@ FcGlyphNameToUcs4 (FcChar8 *name) int r = 0; FcGlyphId gn; - while ((gn = name_to_ucs[i]) != -1) + while ((gn = _fc_name_to_ucs[i]) != -1) { - if (!strcmp ((char *) name, (char *) glyphs[gn].name)) - return glyphs[gn].ucs; + if (!strcmp ((char *) name, (char *) _fc_glyph_names[gn].name)) + return _fc_glyph_names[gn].ucs; if (!r) { r = (int) (h % FC_GLYPHNAME_REHASH); @@ -2952,7 +2952,6 @@ FcFontCapabilities(FT_Face face) FT_ULong *gsubtags=NULL, *gpostags=NULL; FT_UShort gsub_count=0, gpos_count=0; FT_ULong maxsize; - FT_Memory memory = face->stream->memory; FcChar8 *complex_ = NULL; int indx1 = 0, indx2 = 0; -- 2.39.5