]> git.wh0rd.org - fontconfig.git/commitdiff
Eliminate some compiler warnings, avoid seg fault when matching missing
authorKeith Packard <keithp@keithp.com>
Sun, 2 Jun 2002 21:07:57 +0000 (21:07 +0000)
committerKeith Packard <keithp@keithp.com>
Sun, 2 Jun 2002 21:07:57 +0000 (21:07 +0000)
    values

src/fccfg.c
src/fcdbg.c
src/fclist.c
src/fcmatch.c
src/fcname.c

index 65a5728b7fbc375fa9a47f8df68176e0174e3485..b5a9ade5d80014cf24559fc600b1e93e78462a46 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.7 2002/05/29 08:21:33 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.8 2002/06/02 19:51:36 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -1158,7 +1158,7 @@ FcConfigSubstitute (FcConfig      *config,
                 * If there was a test, then replace the matched
                 * value with the new list of values
                 */
-               if (t)
+               if (t && st[i].elt)
                {
                    FcValueList *thisValue = st[i].value;
                    FcValueList *nextValue = thisValue ? thisValue->next : 0;
index 53789d2dc588bf4fc5479df40961c839e8b1e005..9ea9c29b4730f1331c7f6a36290ba64499522039 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: $
+ * $XFree86: xc/lib/fontconfig/src/fcdbg.c,v 1.2 2002/02/18 22:29:28 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -51,6 +51,9 @@ FcValuePrint (FcValue v)
     case FcTypeCharSet:        /* XXX */
        printf (" set");
        break;
+    case FcTypeFTFace:
+       printf (" face");
+       break;
     }
 }
 
index 176017dbc86ea94148f8c1d11af3e9869a8dd729..88e6eabd9f4e7e19ed85b6de755e5fbfbd4a097e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.2 2002/02/28 16:51:48 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.3 2002/05/21 17:06:22 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -224,6 +224,8 @@ FcListValueHash (FcValue    v)
        return FcListMatrixHash (v.u.m);
     case FcTypeCharSet:
        return FcCharSetCount (v.u.c);
+    case FcTypeFTFace:
+       return (FcChar32) v.u.f;
     }
     return 0;
 }
index e4e2c5340e568fc475cf7b177273b0f0afd3b700..e796e4bc8a1958a9d256d83f9c5dddbb14519985 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.7 2002/05/29 22:07:33 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.8 2002/05/31 04:42:42 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -465,7 +465,7 @@ FcSortCompare (const void *aa, const void *ab)
     FcSortNode  *b = *(FcSortNode **) ab;
     double     *as = &a->score[0];
     double     *bs = &b->score[0];
-    double     ad, bd;
+    double     ad = 0, bd = 0;
     int         i;
 
     i = NUM_MATCHER;
index 26ef53eb118f497ae10108504cb67dbdc134ea78..c93706f5429c549fc30cab74ccdd3f67cec7224e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.4 2002/05/29 22:07:33 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.5 2002/06/02 20:52:06 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -464,6 +464,8 @@ FcNameUnparseValue (FcStrBuf        *buf,
        return FcNameUnparseString (buf, temp, 0);
     case FcTypeCharSet:
        return FcNameUnparseCharSet (buf, v.u.c);
+    case FcTypeFTFace:
+       return FcTrue;
     }
     return FcFalse;
 }