/*
- * $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.8 2002/06/02 19:51:36 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.11 2002/06/08 17:32:04 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
static FcValueList *
FcConfigMatchValueList (FcPattern *p,
FcTest *t,
- FcValueList *v)
+ FcValueList *values)
{
FcValueList *ret = 0;
FcExpr *e = t->expr;
FcValue value;
+ FcValueList *v;
while (e)
{
e = 0;
}
- for (; v; v = v->next)
+ for (v = values; v; v = v->next)
{
if (FcConfigCompareValue (v->value, t->op, value))
{
}
}
}
+ FcValueDestroy (value);
}
- FcValueDestroy (value);
return ret;
}
{
if (list)
{
- FcPatternElt *e = FcPatternFind (p, object, FcTrue);
+ FcPatternElt *e = FcPatternInsertElt (p, object);
if (!e)
return;
FcConfigPatternDel (FcPattern *p,
const char *object)
{
- FcPatternElt *e = FcPatternFind (p, object, FcFalse);
+ FcPatternElt *e = FcPatternFindElt (p, object);
if (!e)
return;
while (e->values)
FcConfigPatternCanon (FcPattern *p,
const char *object)
{
- FcPatternElt *e = FcPatternFind (p, object, FcFalse);
+ FcPatternElt *e = FcPatternFindElt (p, object);
if (!e)
return;
if (!e->values)
printf ("FcConfigSubstitute test ");
FcTestPrint (t);
}
- st[i].elt = FcPatternFind (p, t->field, FcFalse);
+ st[i].elt = FcPatternFindElt (p, t->field);
/*
* If there's no such field in the font,
* then FcQualAll matches while FcQualAny does not
st[i].value = FcConfigMatchValueList (p, t, st[i].elt->values);
if (!st[i].value)
break;
+ if (t->qual == FcQualFirst && st[i].value != st[i].elt->values)
+ break;
+ if (t->qual == FcQualNotFirst && st[i].value == st[i].elt->values)
+ break;
}
if (t)
{
* If there was a test, then replace the matched
* value with the new list of values
*/
- if (t && st[i].elt)
+ if (t)
{
FcValueList *thisValue = st[i].value;
FcValueList *nextValue = thisValue ? thisValue->next : 0;