+2005-03-31 Ross Burton <ross@burtonini.com>
+
+ * src/fclist.c:
+ * src/fcmatch.c:
+ * src/fcpat.c:
+ Run all FcPattern objects through FcObjectStaticName, so that
+ compares can be done on pointers instead of strings (#2659)
+
2005-03-17 Tor Lillqvist <tml@novell.com>
* src/fontconfig.def.in: Add the .dll to the dll name.
low = 0;
mid = 0;
c = 1;
+ object = FcObjectStaticName (object);
while (low <= high)
{
mid = (low + high) >> 1;
- c = strcmp (os->objects[mid], object);
+ c = os->objects[mid] - object;
if (c == 0)
return FcTrue;
if (c < 0)
mid++;
memmove (os->objects + mid + 1, os->objects + mid,
(os->nobject - mid) * sizeof (const char *));
- os->objects[mid] = FcObjectStaticName (object);
+ os->objects[mid] = object;
os->nobject++;
return FcTrue;
}
i2 = 0;
while (i1 < pat->num && i2 < fnt->num)
{
- i = strcmp (pat->elts[i1].object, fnt->elts[i2].object);
+ i = pat->elts[i1].object - fnt->elts[i2].object;
if (i > 0)
i2++;
else if (i < 0)
{
int low, high, mid, c;
+ object = FcObjectStaticName(object);
low = 0;
high = p->num - 1;
c = 1;
while (low <= high)
{
mid = (low + high) >> 1;
- c = strcmp (p->elts[mid].object, object);
+ c = p->elts[mid].object - object;
if (c == 0)
return mid;
if (c < 0)