aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcdbg.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-01-07 11:56:06 +0100
committermarha <marha@users.sourceforge.net>2013-01-07 11:56:06 +0100
commit3f553aaceddc9b09363c73d9bea40eaea8164fc4 (patch)
treeb112d1ad761f8621106f8930daaf97fafed339fb /fontconfig/src/fcdbg.c
parent293fd0043af7e861c9c540bebc44630d0da0bf9b (diff)
downloadvcxsrv-3f553aaceddc9b09363c73d9bea40eaea8164fc4.tar.gz
vcxsrv-3f553aaceddc9b09363c73d9bea40eaea8164fc4.tar.bz2
vcxsrv-3f553aaceddc9b09363c73d9bea40eaea8164fc4.zip
pixman xkbcomp libX11 libXau mesa fontconfig xserver xkeyboard-config git update 7 jan 2013
fontconfig: 17eda89ed2e24a3fc5f68538dd7fd9ada8efb087 xserver: bd91b05b631f13afd1f7a9d6cbc4f0c5408b523a xkeyboard-config: 4779e2745094ebe0c06364b4099d7067ae750d07 libX11: cd25cab4b5b957641183ce72dd1ae0424aff1663 libXau: e04364efccbb3bb4cfc5f4cb491ffa1faaaacbdb mesa: afec10df373f342f058aab66c622237964a4a147 pixman: 35cc965514ca6e665c18411fcf66db826d559c2a xkbcomp: e4f767913338052527538d429931e8abd8c3fb88
Diffstat (limited to 'fontconfig/src/fcdbg.c')
-rw-r--r--fontconfig/src/fcdbg.c75
1 files changed, 50 insertions, 25 deletions
diff --git a/fontconfig/src/fcdbg.c b/fontconfig/src/fcdbg.c
index a1ed2b2dd..270d79179 100644
--- a/fontconfig/src/fcdbg.c
+++ b/fontconfig/src/fcdbg.c
@@ -27,44 +27,52 @@
#include <stdlib.h>
static void
-_FcValuePrint (const FcValue v)
+_FcValuePrintFile (FILE *f, const FcValue v)
{
switch (v.type) {
case FcTypeVoid:
- printf ("<void>");
+ fprintf (f, "<void>");
break;
case FcTypeInteger:
- printf ("%d(i)", v.u.i);
+ fprintf (f, "%d(i)", v.u.i);
break;
case FcTypeDouble:
- printf ("%g(f)", v.u.d);
+ fprintf (f, "%g(f)", v.u.d);
break;
case FcTypeString:
- printf ("\"%s\"", v.u.s);
+ fprintf (f, "\"%s\"", v.u.s);
break;
case FcTypeBool:
- printf ("%s", v.u.b ? "FcTrue" : "FcFalse");
+ fprintf (f, "%s", v.u.b ? "True" : "False");
break;
case FcTypeMatrix:
- printf ("(%f %f; %f %f)", v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy);
+ fprintf (f, "[%g %g; %g %g]", v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy);
break;
case FcTypeCharSet: /* XXX */
- FcCharSetPrint (v.u.c);
+ if (f == stdout)
+ FcCharSetPrint (v.u.c);
break;
case FcTypeLangSet:
FcLangSetPrint (v.u.l);
break;
case FcTypeFTFace:
- printf ("face");
+ fprintf (f, "face");
break;
}
}
void
+FcValuePrintFile (FILE *f, const FcValue v)
+{
+ fprintf (f, " ");
+ _FcValuePrintFile (f, v);
+}
+
+void
FcValuePrint (const FcValue v)
{
printf (" ");
- _FcValuePrint (v);
+ _FcValuePrintFile (stdout, v);
}
void
@@ -74,7 +82,7 @@ FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark)
printf (" [insert here] ");
else
printf (" ");
- _FcValuePrint (v);
+ _FcValuePrintFile (stdout, v);
}
static void
@@ -249,11 +257,17 @@ FcExprPrint (const FcExpr *expr)
case FcOpInteger: printf ("%d", expr->u.ival); break;
case FcOpDouble: printf ("%g", expr->u.dval); break;
case FcOpString: printf ("\"%s\"", expr->u.sval); break;
- case FcOpMatrix: printf ("[%g %g %g %g]",
- expr->u.mval->xx,
- expr->u.mval->xy,
- expr->u.mval->yx,
- expr->u.mval->yy); break;
+ case FcOpMatrix:
+ printf ("[");
+ FcExprPrint (expr->u.mexpr->xx);
+ printf (" ");
+ FcExprPrint (expr->u.mexpr->xy);
+ printf ("; ");
+ FcExprPrint (expr->u.mexpr->yx);
+ printf (" ");
+ FcExprPrint (expr->u.mexpr->yy);
+ printf ("]");
+ break;
case FcOpRange: break;
case FcOpBool: printf ("%s", expr->u.bval ? "true" : "false"); break;
case FcOpCharSet: printf ("charset\n"); break;
@@ -263,7 +277,16 @@ FcExprPrint (const FcExpr *expr)
printf ("\n");
break;
case FcOpNil: printf ("nil\n"); break;
- case FcOpField: printf ("%s", FcObjectName(expr->u.object)); break;
+ case FcOpField: printf ("%s ", FcObjectName(expr->u.name.object));
+ switch ((int) expr->u.name.kind) {
+ case FcMatchPattern:
+ printf ("(pattern) ");
+ break;
+ case FcMatchFont:
+ printf ("(font) ");
+ break;
+ }
+ break;
case FcOpConst: printf ("%s", expr->u.constant); break;
case FcOpQuest:
FcExprPrint (expr->u.tree.left);
@@ -432,15 +455,17 @@ int FcDebugVal;
void
FcInitDebug (void)
{
- char *e;
+ if (!FcDebugVal) {
+ char *e;
- e = getenv ("FC_DEBUG");
- if (e)
- {
- printf ("FC_DEBUG=%s\n", e);
- FcDebugVal = atoi (e);
- if (FcDebugVal < 0)
- FcDebugVal = 0;
+ e = getenv ("FC_DEBUG");
+ if (e)
+ {
+ printf ("FC_DEBUG=%s\n", e);
+ FcDebugVal = atoi (e);
+ if (FcDebugVal < 0)
+ FcDebugVal = 0;
+ }
}
}
#define __fcdbg__