Commit 7ce19673 authored by Keith Packard's avatar Keith Packard

Rework cache files to use offsets for all data structures.

Replace all of the bank/id pairs with simple offsets, recode several
data structures to always use offsets inside the library to avoid
conditional paths. Exposed data structures use pointers to hold offsets,
setting the low bit to distinguish between offset and pointer.

Use offset-based data structures for lang charset encodings; eliminates
separate data structure format for that file.

Much testing will be needed; offsets are likely not detected everywhere in
the library yet.
parent 2a9179d8
......@@ -31,4 +31,5 @@
@@@ name endian char char* int Pattern EltPtr Elt * Elt ObjPtr VLPtr Value Binding VL * CharSet Leaf** Char16 * Char16 Leaf Char32 Cache PageSize
x86 78563412_00000001_00000004_00000004_00000018_00000008_00000004_0000000c_00000004_00000008_0000000c_00000004_00000004_00000014_00000004_00000004_00000002_00000020_00000004_00000038_00001000
x86-64 78563412_00000001_00000008_00000004_00000020_00000010_00000008_00000018_00000004_00000010_00000010_00000004_00000008_00000020_00000008_00000008_00000002_00000020_00000004_00000040_00001000
ppc 12345678_00000001_00000004_00000004_00000018_00000008_00000004_0000000c_00000004_00000008_00000010_00000004_00000004_00000014_00000004_00000004_00000002_00000020_00000004_00000038_00001000
ppc-4k 12345678_00000001_00000004_00000004_00000018_00000008_00000004_0000000c_00000004_00000008_00000010_00000004_00000004_00000014_00000004_00000004_00000002_00000020_00000004_00000038_00001000
ppc-64k 12345678_00000001_00000004_00000004_00000018_00000008_00000004_0000000c_00000004_00000008_00000010_00000004_00000004_00000014_00000004_00000004_00000002_00000020_00000004_00000038_00010000
......@@ -37,10 +37,6 @@
* functions are also needed in slightly modified form
*/
const FcChar16 langBankNumbers[1]; /* place holders so that externs resolve */
const FcCharLeaf langBankLeaves[1];
const int langBankLeafIdx[1];
void
FcMemAlloc (int kind, int size)
{
......@@ -51,18 +47,6 @@ FcMemFree (int kind, int size)
{
}
int* _fcBankId = 0;
int* _fcBankIdx = 0;
FcValueList ** _fcValueLists = 0;
FcPatternElt ** _fcPatternElts = 0;
int FcDebugVal = 0;
int
FcCacheBankToIndexMTF (int bank)
{
return -1;
}
FcChar8 *
FcConfigHome (void)
{
......@@ -239,19 +223,18 @@ main (int argc, char **argv)
static char *files[MAX_LANG];
static FcCharSet *sets[MAX_LANG];
static int duplicate[MAX_LANG];
static int offsets[MAX_LANG];
static int country[MAX_LANG];
static char *names[MAX_LANG];
static char *langs[MAX_LANG];
static int off[MAX_LANG];
FILE *f;
int offset = 0;
int ncountry = 0;
int i = 0;
int nsets = 0;
int argi;
FcCharLeaf **leaves;
int total_leaves = 0;
int offset_count = 0;
int l, sl, tl;
int l, sl, tl, tn;
static char line[1024];
static FcChar32 map[MAX_LANG_SET_MAP];
int num_lang_set_map;
......@@ -290,6 +273,7 @@ main (int argc, char **argv)
i++;
fclose (f);
}
nsets = i;
sets[i] = 0;
leaves = malloc (total_leaves * sizeof (FcCharLeaf *));
tl = 0;
......@@ -301,10 +285,10 @@ main (int argc, char **argv)
for (sl = 0; sl < sets[i]->num; sl++)
{
for (l = 0; l < tl; l++)
if (leaves[l] == FcCharSetGetLeaf(sets[i], sl))
if (leaves[l] == FcCharSetLeaf(sets[i], sl))
break;
if (l == tl)
leaves[tl++] = FcCharSetGetLeaf(sets[i], sl);
leaves[tl++] = FcCharSetLeaf(sets[i], sl);
}
}
......@@ -321,22 +305,6 @@ main (int argc, char **argv)
printf ("/* total size: %d unique leaves: %d */\n\n",
total_leaves, tl);
/*
* Dump leaves
*/
printf ("const FcCharLeaf langBankLeaves[%d] = {\n", tl);
for (l = 0; l < tl; l++)
{
printf (" { { /* %d */", l);
for (i = 0; i < 256/32; i++)
{
if (i % 4 == 0)
printf ("\n ");
printf (" 0x%08x,", leaves[l]->map[i]);
}
printf ("\n } },\n");
}
printf ("};\n\n");
/*
* Find duplicate charsets
......@@ -355,111 +323,121 @@ main (int argc, char **argv)
}
}
tn = 0;
for (i = 0; sets[i]; i++) {
if (duplicate[i] >= 0)
continue;
off[i] = tn;
tn += sets[i]->num;
}
printf ("#define LEAF0 (%d * sizeof (FcLangCharSet))\n", nsets);
printf ("#define OFF0 (LEAF0 + %d * sizeof (FcCharLeaf))\n", tl);
printf ("#define NUM0 (OFF0 + %d * sizeof (intptr_t))\n", tn);
printf ("#define SET(n) (n * sizeof (FcLangCharSet) + offsetof (FcLangCharSet, charset))\n");
printf ("#define OFF(s,o) (OFF0 + o * sizeof (intptr_t) - SET(s))\n");
printf ("#define NUM(s,n) (NUM0 + n * sizeof (FcChar16) - SET(s))\n");
printf ("#define LEAF(o,l) (LEAF0 + l * sizeof (FcCharLeaf) - (OFF0 + o * sizeof (intptr_t)))\n");
printf ("#define fcLangCharSets (fcLangData.langCharSets)\n");
printf ("\n");
printf ("static const struct {\n"
" FcLangCharSet langCharSets[%d];\n"
" FcCharLeaf leaves[%d];\n"
" intptr_t leaf_offsets[%d];\n"
" FcChar16 numbers[%d];\n"
"} fcLangData = {\n",
nsets, tl, tn, tn);
/*
* Find ranges for each letter for faster searching
* Dump sets
*/
setRangeChar = 'a';
printf ("{\n");
for (i = 0; sets[i]; i++)
{
char c = names[i][0];
while (setRangeChar <= c && c <= 'z')
setRangeStart[setRangeChar++ - 'a'] = i;
int j = duplicate[i];
if (j < 0)
j = i;
printf (" { (FcChar8 *) \"%s\", "
" { FC_REF_CONSTANT, %d, OFF(%d,%d), NUM(%d,%d) } }, /* %d */\n",
langs[i],
sets[j]->num, i, off[j], i, off[j], i);
}
for (setRangeChar = 'a'; setRangeChar < 'z'; setRangeChar++)
setRangeEnd[setRangeChar - 'a'] = setRangeStart[setRangeChar+1-'a'] - 1;
setRangeEnd[setRangeChar - 'a'] = i - 1;
printf ("},\n");
/*
* Dump arrays
* Dump leaves
*/
for (i = 0; sets[i]; i++)
printf ("{\n");
for (l = 0; l < tl; l++)
{
int n;
if (duplicate[i] >= 0)
continue;
for (n = 0; n < sets[i]->num; n++)
printf (" { { /* %d */", l);
for (i = 0; i < 256/32; i++)
{
for (l = 0; l < tl; l++)
if (leaves[l] == FcCharSetGetLeaf(sets[i], n))
break;
if (l == tl)
fatal (names[i], 0, "can't find leaf");
offset_count++;
if (i % 4 == 0)
printf ("\n ");
printf (" 0x%08x,", leaves[l]->map[i]);
}
offsets[i] = offset;
offset += sets[i]->num;
printf ("\n } },\n");
}
printf ("},\n");
printf ("const int langBankLeafIdx[%d] = {\n",
offset_count);
/*
* Dump leaves
*/
printf ("{\n");
for (i = 0; sets[i]; i++)
{
int n;
if (duplicate[i] >= 0)
continue;
printf (" /* %s */\n", names[i]);
for (n = 0; n < sets[i]->num; n++)
{
if (n % 8 == 0)
if (n % 4 == 0)
printf (" ");
for (l = 0; l < tl; l++)
if (leaves[l] == FcCharSetGetLeaf(sets[i], n))
if (leaves[l] == FcCharSetLeaf(sets[i], n))
break;
if (l == tl)
fatal (names[i], 0, "can't find leaf");
printf (" %3d,", l);
if (n % 8 == 7)
printf (" LEAF(%3d,%3d),", off[i], l);
if (n % 4 == 3)
printf ("\n");
}
if (n % 8 != 0)
if (n % 4 != 0)
printf ("\n");
}
printf ("};\n\n");
printf ("const FcChar16 langBankNumbers[%d] = {\n",
offset_count);
printf ("},\n");
printf ("{\n");
for (i = 0; sets[i]; i++)
{
int n;
if (duplicate[i] >= 0)
continue;
printf (" /* %s */\n", names[i]);
for (n = 0; n < sets[i]->num; n++)
{
if (n % 8 == 0)
printf (" ");
printf (" 0x%04x,", FcCharSetGetNumbers(sets[i])[n]);
printf (" 0x%04x,", FcCharSetNumbers (sets[i])[n]);
if (n % 8 == 7)
printf ("\n");
}
if (n % 8 != 0)
printf ("\n");
}
printf ("};\n\n");
printf ("}\n");
/*
* Dump sets
*/
printf ("const FcLangCharSet fcLangCharSets[] = {\n");
for (i = 0; sets[i]; i++)
{
int j = duplicate[i];
if (j < 0)
j = i;
printf (" { (FcChar8 *) \"%s\",\n"
" { FC_REF_CONSTANT, %d, FC_BANK_LANGS, "
"{ { %d, %d } } } }, /* %d */\n",
langs[i],
sets[j]->num, offsets[j], offsets[j], j);
}
printf ("};\n\n");
printf ("#define NUM_LANG_CHAR_SET %d\n", i);
num_lang_set_map = (i + 31) / 32;
printf ("#define NUM_LANG_SET_MAP %d\n", num_lang_set_map);
......@@ -506,6 +484,23 @@ main (int argc, char **argv)
}
/*
* Find ranges for each letter for faster searching
*/
setRangeChar = 'a';
memset(setRangeStart, '\0', sizeof (setRangeStart));
memset(setRangeEnd, '\0', sizeof (setRangeEnd));
for (i = 0; sets[i]; i++)
{
char c = names[i][0];
while (setRangeChar <= c && c <= 'z')
setRangeStart[setRangeChar++ - 'a'] = i;
}
for (setRangeChar = 'a'; setRangeChar < 'z'; setRangeChar++)
setRangeEnd[setRangeChar - 'a'] = setRangeStart[setRangeChar+1-'a'] - 1;
setRangeEnd[setRangeChar - 'a'] = i - 1;
/*
* Dump sets start/finish for the fastpath
*/
......
......@@ -212,17 +212,14 @@ typedef struct _FcValue {
FcType type;
union {
const FcChar8 *s;
int s_off;
int i;
FcBool b;
double d;
const FcMatrix *m;
const FcCharSet *c;
int c_off;
void *f;
const FcPattern *p;
const FcLangSet *l;
int l_off; /* this is a difference of char *s */
} u;
} FcValue;
......
......@@ -95,6 +95,7 @@ libfontconfig_la_SOURCES = \
fcmatrix.c \
fcname.c \
fcpat.c \
fcserialize.c \
fcstr.c \
fcxml.c \
ftglue.h \
......
This diff is collapsed.
......@@ -310,11 +310,12 @@ FcConfigBuildFonts (FcConfig *config)
for (i = 0; i < cached_fonts->nfont; i++)
{
FcChar8 *cfn;
FcPatternGetString (cached_fonts->fonts[i], FC_FILE, 0, &cfn);
FcPattern *font = cached_fonts->fonts[i];
FcPatternObjectGetString (font, FC_FILE_OBJECT, 0, &cfn);
if (FcConfigAcceptFont (config, cached_fonts->fonts[i]) &&
if (FcConfigAcceptFont (config, font) &&
(cfn && FcConfigAcceptFilename (config, cfn)))
FcFontSetAdd (fonts, cached_fonts->fonts[i]);
FcFontSetAdd (fonts, font);
cached_fonts->fonts[i] = 0; /* prevent free in FcFontSetDestroy */
}
......@@ -841,7 +842,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
v.u.b = e->u.bval;
break;
case FcOpField:
r = FcPatternGet (p, e->u.field, 0, &v);
r = FcPatternObjectGet (p, e->u.object, 0, &v);
if (r != FcResultMatch)
v.type = FcTypeVoid;
v = FcValueSave (v);
......@@ -1093,7 +1094,7 @@ FcConfigMatchValueList (FcPattern *p,
e = 0;
}
for (v = values; v; v = FcValueListPtrU(v->next))
for (v = values; v; v = FcValueListNext(v))
{
/* Compare the pattern value to the match expression value */
if (FcConfigCompareValue (&v->value, t->op, &value))
......@@ -1129,17 +1130,17 @@ FcConfigValues (FcPattern *p, FcExpr *e, FcValueBinding binding)
if (e->op == FcOpComma)
{
l->value = FcConfigEvaluate (p, e->u.tree.left);
l->next = FcValueListPtrCreateDynamic(FcConfigValues (p, e->u.tree.right, binding));
l->next = FcConfigValues (p, e->u.tree.right, binding);
}
else
{
l->value = FcConfigEvaluate (p, e);
l->next = FcValueListPtrCreateDynamic(0);
l->next = NULL;
}
l->binding = binding;
if (l->value.type == FcTypeVoid)
{
FcValueList *next = FcValueListPtrU(l->next);
FcValueList *next = FcValueListNext(l);
FcMemFree (FC_MEM_VALLIST, sizeof (FcValueList));
free (l);
......@@ -1162,27 +1163,26 @@ FcConfigAdd (FcValueListPtr *head,
sameBinding = position->binding;
else
sameBinding = FcValueBindingWeak;
for (v = FcValueListPtrCreateDynamic(new); FcValueListPtrU(v);
v = FcValueListPtrU(v)->next)
if (FcValueListPtrU(v)->binding == FcValueBindingSame)
FcValueListPtrU(v)->binding = sameBinding;
for (v = new; v != NULL; v = FcValueListNext(v))
if (v->binding == FcValueBindingSame)
v->binding = sameBinding;
if (append)
{
if (position)
prev = &position->next;
else
for (prev = head; FcValueListPtrU(*prev);
prev = &(FcValueListPtrU(*prev)->next))
for (prev = head; *prev != NULL;
prev = &(*prev)->next)
;
}
else
{
if (position)
{
for (prev = head; FcValueListPtrU(*prev);
prev = &(FcValueListPtrU(*prev)->next))
for (prev = head; *prev != NULL;
prev = &(*prev)->next)
{
if (FcValueListPtrU(*prev) == position)
if (*prev == position)
break;
}
}
......@@ -1191,7 +1191,7 @@ FcConfigAdd (FcValueListPtr *head,
if (FcDebug () & FC_DBG_EDIT)
{
if (!FcValueListPtrU(*prev))
if (*prev == NULL)
printf ("position not on list\n");
}
}
......@@ -1205,12 +1205,12 @@ FcConfigAdd (FcValueListPtr *head,
if (new)
{
last = FcValueListPtrCreateDynamic(new);
while (FcValueListPtrU(FcValueListPtrU(last)->next))
last = FcValueListPtrU(last)->next;
last = new;
while (last->next != NULL)
last = last->next;
FcValueListPtrU(last)->next = *prev;
*prev = FcValueListPtrCreateDynamic(new);
last->next = *prev;
*prev = new;
}
if (FcDebug () & FC_DBG_EDIT)
......@@ -1229,14 +1229,13 @@ FcConfigDel (FcValueListPtr *head,
{
FcValueListPtr *prev;
for (prev = head; FcValueListPtrU(*prev);
prev = &(FcValueListPtrU(*prev)->next))
for (prev = head; *prev != NULL; prev = &(*prev)->next)
{
if (FcValueListPtrU(*prev) == position)
if (*prev == position)
{
*prev = position->next;
position->next = FcValueListPtrCreateDynamic(0);
FcValueListDestroy (FcValueListPtrCreateDynamic(position));
position->next = NULL;
FcValueListDestroy (position);
break;
}
}
......@@ -1244,13 +1243,13 @@ FcConfigDel (FcValueListPtr *head,
static void
FcConfigPatternAdd (FcPattern *p,
const char *object,
FcObject object,
FcValueList *list,
FcBool append)
{
if (list)
{
FcPatternElt *e = FcPatternInsertElt (p, object);
FcPatternElt *e = FcPatternObjectInsertElt (p, object);
if (!e)
return;
......@@ -1263,24 +1262,24 @@ FcConfigPatternAdd (FcPattern *p,
*/
static void
FcConfigPatternDel (FcPattern *p,
const char *object)
FcObject object)
{
FcPatternElt *e = FcPatternFindElt (p, object);
FcPatternElt *e = FcPatternObjectFindElt (p, object);
if (!e)
return;
while (FcValueListPtrU(e->values))
FcConfigDel (&e->values, FcValueListPtrU(e->values));
while (e->values != NULL)
FcConfigDel (&e->values, e->values);
}
static void
FcConfigPatternCanon (FcPattern *p,
const char *object)
FcObject object)
{
FcPatternElt *e = FcPatternFindElt (p, object);
FcPatternElt *e = FcPatternObjectFindElt (p, object);
if (!e)
return;
if (!FcValueListPtrU(e->values))
FcPatternDel (p, object);
if (e->values == NULL)
FcPatternObjectDel (p, object);
}
FcBool
......@@ -1337,7 +1336,7 @@ FcConfigSubstituteWithPat (FcConfig *config,
else
m = p;
if (m)
st[i].elt = FcPatternFindElt (m, t->field);
st[i].elt = FcPatternObjectFindElt (m, t->object);
else
st[i].elt = 0;
/*
......@@ -1358,12 +1357,12 @@ FcConfigSubstituteWithPat (FcConfig *config,
* Check to see if there is a match, mark the location
* to apply match-relative edits
*/
st[i].value = FcConfigMatchValueList (m, t, FcValueListPtrU(st[i].elt->values));
st[i].value = FcConfigMatchValueList (m, t, st[i].elt->values);
if (!st[i].value)
break;
if (t->qual == FcQualFirst && st[i].value != FcValueListPtrU(st[i].elt->values))
if (t->qual == FcQualFirst && st[i].value != st[i].elt->values)
break;
if (t->qual == FcQualNotFirst && st[i].value == FcValueListPtrU(st[i].elt->values))
if (t->qual == FcQualNotFirst && st[i].value == st[i].elt->values)
break;
}
if (t)
......@@ -1391,8 +1390,7 @@ FcConfigSubstituteWithPat (FcConfig *config,
for (t = s->test, i = 0; t; t = t->next, i++)
{
if ((t->kind == FcMatchFont || kind == FcMatchPattern) &&
!FcStrCmpIgnoreCase ((FcChar8 *) t->field,
(FcChar8 *) e->field))
t->object == e->object)
{
/*
* KLUDGE - the pattern may have been reallocated or
......@@ -1401,7 +1399,7 @@ FcConfigSubstituteWithPat (FcConfig *config,
* the element again
*/
if (e != s->edit && st[i].elt)
st[i].elt = FcPatternFindElt (p, t->field);
st[i].elt = FcPatternObjectFindElt (p, t->object);
if (!st[i].elt)
t = 0;
break;
......@@ -1416,7 +1414,7 @@ FcConfigSubstituteWithPat (FcConfig *config,
if (t)
{
FcValueList *thisValue = st[i].value;
FcValueList *nextValue = thisValue ? FcValueListPtrU(thisValue->next) : 0;
FcValueList *nextValue = thisValue;
/*
* Append the new list of values after the current value
......@@ -1444,8 +1442,8 @@ FcConfigSubstituteWithPat (FcConfig *config,
* Delete all of the values and insert
* the new set
*/
FcConfigPatternDel (p, e->field);
FcConfigPatternAdd (p, e->field, l, FcTrue);
FcConfigPatternDel (p, e->object);
FcConfigPatternAdd (p, e->object, l, FcTrue);
/*
* Adjust any pointers into the value list as they no
* longer point to anything valid
......@@ -1468,7 +1466,7 @@ FcConfigSubstituteWithPat (FcConfig *config,
}
/* fall through ... */
case FcOpPrependFirst:
FcConfigPatternAdd (p, e->field, l, FcFalse);
FcConfigPatternAdd (p, e->object, l, FcFalse);
break;
case FcOpAppend:
if (t)
......@@ -1478,10 +1476,10 @@ FcConfigSubstituteWithPat (FcConfig *config,
}
/* fall through ... */
case FcOpAppendLast:
FcConfigPatternAdd (p, e->field, l, FcTrue);
FcConfigPatternAdd (p, e->object, l, FcTrue);
break;
default:
FcValueListDestroy (FcValueListPtrCreateDynamic(l));
FcValueListDestroy (l);
break;
}
}
......@@ -1490,7 +1488,7 @@ FcConfigSubstituteWithPat (FcConfig *config,
* any properties without data
*/
for (e = s->edit; e; e = e->next)
FcConfigPatternCanon (p, e->field);
FcConfigPatternCanon (p, e->object);
if (FcDebug () & FC_DBG_EDIT)
{
......
This diff is collapsed.
......@@ -49,7 +49,8 @@ FcValuePrint (const FcValue v)
printf (" (%f %f; %f %f)", v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy);
break;
case FcTypeCharSet: /* XXX */
printf (" set");
printf (" ");
FcCharSetPrint (v.u.c);
break;
case FcTypeLangSet:
printf (" ");
......@@ -64,10 +65,10 @@ FcValuePrint (const FcValue v)
void
FcValueListPrint (FcValueListPtr l)
{
for (; FcValueListPtrU(l); l = FcValueListPtrU(l)->next)
for (; l != NULL; l = FcValueListNext(l))
{
FcValuePrint (FcValueCanonicalize(&FcValueListPtrU(l)->value));
switch (FcValueListPtrU(l)->binding) {
FcValuePrint (FcValueCanonicalize(&l->value));
switch (l->binding) {
case FcValueBindingWeak:
printf ("(w)");
break;
......@@ -95,6 +96,22 @@ FcLangSetPrint (const FcLangSet *ls)
FcStrBufDestroy (&buf);
}
void
FcCharSetPrint (const FcCharSet *c)
{
int i, j;
for (i = 0; i < c->num; i++)
{
FcCharLeaf *leaf = FcCharSetLeaf(c, i);
printf ("%04x:", FcCharSetNumbers(c)[i]);
for (j = 0; j < 256/32; j++)
printf (" %08x", leaf->map[j]);
printf ("\n");
}
}
void
FcPatternPrint (const FcPattern *p)
{
......@@ -109,15 +126,15 @@ FcPatternPrint (const FcPattern *p)
printf ("Pattern has %d elts (size %d)\n", p->num, p->size);
for (i = 0; i < p->num; i++)
{
e = FcPatternEltU(p->elts) + i;
printf ("\t%s:", FcObjectPtrU(e->object));
e = &FcPatternElts(p)[i];
printf ("\t%s:", FcObjectName(e->object));
/* so that fc-match properly displays file: foo... */
if (e->object == FcObjectToPtr(FC_FILE))
if (e->object == FC_FILE_OBJECT)
{
FcChar8 * s;
FcPatternGetString (p, FC_FILE, 0, &s);
FcPatternObjectGetString (p, FC_FILE_OBJECT, 0, &s);
printf (" \"%s\"", s);
switch (FcValueListPtrU(e->values)->binding) {
switch (FcPatternEltValues(e)->binding) {
case FcValueBindingWeak:
printf ("(w)");
break;
......@@ -130,7 +147,7 @@ FcPatternPrint (const FcPattern *p)
}
}
else
FcValueListPrint (e->values);
FcValueListPrint (FcPatternEltValues(e));
printf ("\n");
}
printf ("\n");
......@@ -197,7 +214,7 @@ FcExprPrint (const FcExpr *expr)
case FcOpBool: printf ("%s", expr->u.bval ? "true" : "false"); break;
case FcOpCharSet: printf ("charset\n"); break;
case FcOpNil: printf ("nil\n"); break;
case FcOpField: printf ("%s", expr->u.field); break;
case FcOpField: printf ("%s", FcObjectName(expr->u.object)); break;
case FcOpConst: printf ("%s", expr->u.constant); break;
case FcOpQuest:
FcExprPrint (expr->u.tree.left);
......@@ -307,7 +324,7 @@ FcTestPrint (const FcTest *test)
printf ("not_first ");
break;
}
printf ("%s ", test->field);
printf ("%s ", FcObjectName (test->object));
FcOpPrint (test->op);
printf (" ");
FcExprPrint (test->expr);
......@@ -317,7 +334,7 @@ FcTestPrint (const FcTest *test)
void
FcEditPrint (const FcEdit *edit)
{
printf ("Edit %s ", edit->field);
printf ("Edit %s ", FcObjectName (edit->object));
FcOpPrint (edit->op);
printf (" ");
FcExprPrint (edit->expr);
......
......@@ -26,14 +26,14 @@
#include <locale.h>
static const struct {
const char *field;
FcObject field;
FcBool value;
} FcBoolDefaults[] = {
{ FC_HINTING, FcTrue }, /* !FT_LOAD_NO_HINTING */
{ FC_VERTICAL_LAYOUT, FcFalse }, /* FC_LOAD_VERTICAL_LAYOUT */
{ FC_AUTOHINT, FcFalse }, /* FC_LOAD_FORCE_AUTOHINT */
{ FC_GLOBAL_ADVANCE, FcTrue }, /* !FC_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */
{ FC_EMBEDDED_BITMAP, FcTrue }, /* !FC_LOAD_NO_BITMAP */
{ FC_HINTING_OBJECT, FcTrue }, /* !FT_LOAD_NO_HINTING */
{ FC_VERTICAL_LAYOUT_OBJECT, FcFalse }, /* FC_LOAD_VERTICAL_LAYOUT */