[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.
This commit is contained in:
Behdad Esfahbod 2009-11-18 09:26:24 -05:00
parent 3e5e83e12e
commit 192927225c
2 changed files with 9 additions and 10 deletions

View File

@ -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);

View File

@ -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;