]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcname.c
Don't assign types to user object names.
[fontconfig.git] / src / fcname.c
index bf265bd26f63ddc9a4b631b9fd31bbd041cd301e..d7100359f7e29bcccae4c3b8445218ef4e8a719f 100644 (file)
@@ -93,7 +93,8 @@ struct _FcObjectTypeList {
 static const FcObjectTypeList _FcBaseObjectTypesList = {
     0,
     _FcBaseObjectTypes,
-    NUM_OBJECT_TYPES
+    NUM_OBJECT_TYPES,
+    0
 };
 
 static const FcObjectTypeList  *_FcObjectTypes = &_FcBaseObjectTypesList;
@@ -154,6 +155,9 @@ FcNameGetObjectType (const char *object)
     
     for (l = _FcObjectTypes; l; l = l->next)
     {
+        if (l == (FcObjectTypeList*)_FcUserObjectNames)
+            continue;
+
        for (i = 0; i < l->ntypes; i++)
        {
            t = &l->types[i];
@@ -363,7 +367,7 @@ FcObjectSerialize ()
 }
 
 void *
-FcObjectUnserialize (FcCache metadata, void *block_ptr)
+FcObjectUnserialize (FcCache metadata, void *block_ptr)
 {
     int new_biggest;
     new_biggest = *(int *)block_ptr;
@@ -415,12 +419,6 @@ FcObjectUnserialize (FcCache metadata, void *block_ptr)
     return block_ptr;
 }
 
-int
-FcObjectPtrCompare (const FcObjectPtr a, const FcObjectPtr b)
-{
-    return a - b;
-}
-
 static const FcConstant _FcBaseConstants[] = {
     { (FcChar8 *) "thin",          "weight",   FC_WEIGHT_THIN, },
     { (FcChar8 *) "extralight",            "weight",   FC_WEIGHT_EXTRALIGHT, },
@@ -779,7 +777,6 @@ FcNameUnparseString (FcStrBuf           *buf,
 
 static FcBool
 FcNameUnparseValue (FcStrBuf   *buf,
-                   int         bank,
                    FcValue     *v0,
                    FcChar8     *escape)
 {
@@ -820,7 +817,7 @@ FcNameUnparseValueList (FcStrBuf    *buf,
 {
     while (FcValueListPtrU(v))
     {
-       if (!FcNameUnparseValue (buf, v.bank, &FcValueListPtrU(v)->value, escape))
+       if (!FcNameUnparseValue (buf, &FcValueListPtrU(v)->value, escape))
            return FcFalse;
        if (FcValueListPtrU(v = FcValueListPtrU(v)->next))
            if (!FcNameUnparseString (buf, (FcChar8 *) ",", 0))