case FcTypeCharSet:
switch (op) {
case FcOpContains:
- /* m contains v if v is a subset of m */
- ret = FcCharSetIsSubset (v.u.c, m.u.c);
+ /* v contains m if m is a subset of v */
+ ret = FcCharSetIsSubset (m.u.c, v.u.c);
break;
case FcOpNotContains:
- /* m contains v if v is a subset of m */
- ret = !FcCharSetIsSubset (v.u.c, m.u.c);
+ /* v contains m if m is a subset of v */
+ ret = !FcCharSetIsSubset (m.u.c, v.u.c);
break;
case FcOpEqual:
ret = FcCharSetEqual (m.u.c, v.u.c);
{
an = a->numbers[ai];
bn = b->numbers[bi];
+ /*
+ * Check matching pages
+ */
if (an == bn)
{
FcChar32 *am = a->leaves[ai]->map;
if (am != bm)
{
int i = 256/32;
+ /*
+ * Does am have any bits not in bm?
+ */
while (i--)
if (*am++ & ~*bm++)
return FcFalse;
ai++;
bi++;
}
+ /*
+ * Does a have any pages not in b?
+ */
else if (an < bn)
return FcFalse;
else
int low = bi + 1;
int high = b->num - 1;
+ /*
+ * Search for page 'an' in 'b'
+ */
while (low <= high)
{
int mid = (low + high) >> 1;
bi++;
}
}
+ /*
+ * did we look at every page?
+ */
return ai >= a->num;
}