]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcdbg.c
Was miscomputing end of string position for FcStrtod in locales with
[fontconfig.git] / src / fcdbg.c
index 673204544003ebc8ea28fb6254d55dd779ce20ce..8d4439b944b7931c01f73606e4ca78fa0bfcfabf 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fcdbg.c,v 1.10 2002/08/22 18:53:22 keithp Exp $
+ * $RCSId: xc/lib/fontconfig/src/fcdbg.c,v 1.10 2002/08/22 18:53:22 keithp Exp $
  *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2000 Keith Packard
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -29,9 +29,6 @@
 void
 FcValuePrint (const FcValue v)
 {
-    FcStrBuf   buf;
-    FcChar8    init_buf[1024];
-    
     switch (v.type) {
     case FcTypeVoid:
        printf (" <void>");
@@ -55,12 +52,8 @@ FcValuePrint (const FcValue v)
        printf (" set");
        break;
     case FcTypeLangSet:
-       FcStrBufInit (&buf, init_buf, sizeof (init_buf));
-        if (FcNameUnparseLangSet (&buf, v.u.l) && FcStrBufChar (&buf,'\0'))
-           printf (" %s", buf.buf);
-       else
-           printf ("langset (alloc error)");
-       FcStrBufDestroy (&buf);
+       printf (" ");
+       FcLangSetPrint (v.u.l);
        break;
     case FcTypeFTFace:
        printf (" face");
@@ -88,6 +81,20 @@ FcValueListPrint (const FcValueList *l)
     }
 }
 
+void
+FcLangSetPrint (const FcLangSet *ls)
+{
+    FcStrBuf   buf;
+    FcChar8    init_buf[1024];
+    
+    FcStrBufInit (&buf, init_buf, sizeof (init_buf));
+    if (FcNameUnparseLangSet (&buf, ls) && FcStrBufChar (&buf,'\0'))
+       printf ("%s", buf.buf);
+    else
+       printf ("langset (alloc error)");
+    FcStrBufDestroy (&buf);
+}
+
 void
 FcPatternPrint (const FcPattern *p)
 {
@@ -146,6 +153,10 @@ FcOpPrint (FcOp op)
     case FcOpNot: printf ("Not"); break;
     case FcOpNil: printf ("Nil"); break;
     case FcOpComma: printf ("Comma"); break;
+    case FcOpFloor: printf ("Floor"); break;
+    case FcOpCeil: printf ("Ceil"); break;
+    case FcOpRound: printf ("Round"); break;
+    case FcOpTrunc: printf ("Trunc"); break;
     case FcOpInvalid: printf ("Invalid"); break;
     }
 }
@@ -229,6 +240,22 @@ FcExprPrint (const FcExpr *expr)
        printf ("Not ");
        FcExprPrint (expr->u.tree.left);
        break;
+    case FcOpFloor:
+       printf ("Floor ");
+       FcExprPrint (expr->u.tree.left);
+       break;
+    case FcOpCeil:
+       printf ("Ceil ");
+       FcExprPrint (expr->u.tree.left);
+       break;
+    case FcOpRound:
+       printf ("Round ");
+       FcExprPrint (expr->u.tree.left);
+       break;
+    case FcOpTrunc:
+       printf ("Trunc ");
+       FcExprPrint (expr->u.tree.left);
+       break;
     case FcOpInvalid: printf ("Invalid"); break;
     }
 }