diff options
author | marha <marha@users.sourceforge.net> | 2012-05-02 09:01:55 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-05-02 09:01:55 +0200 |
commit | 3d353f31ac1671d1b39c09b1f8d82c8811d3edd6 (patch) | |
tree | ce19dbcec75ce7e87547f6f9b3495888aaea0966 /fontconfig/src/fcdbg.c | |
parent | b2a0f04a2984b290c1224fc1b1883d08b01a6231 (diff) | |
parent | e67b35e7a899da5805fcce3d390cb10ebcaffe91 (diff) | |
download | vcxsrv-3d353f31ac1671d1b39c09b1f8d82c8811d3edd6.tar.gz vcxsrv-3d353f31ac1671d1b39c09b1f8d82c8811d3edd6.tar.bz2 vcxsrv-3d353f31ac1671d1b39c09b1f8d82c8811d3edd6.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/os/connection.c
Diffstat (limited to 'fontconfig/src/fcdbg.c')
-rw-r--r-- | fontconfig/src/fcdbg.c | 79 |
1 files changed, 56 insertions, 23 deletions
diff --git a/fontconfig/src/fcdbg.c b/fontconfig/src/fcdbg.c index cf2ff0870..10f3cc9aa 100644 --- a/fontconfig/src/fcdbg.c +++ b/fontconfig/src/fcdbg.c @@ -26,59 +26,92 @@ #include <stdio.h> #include <stdlib.h> -void -FcValuePrint (const FcValue v) +static void +_FcValuePrint (const FcValue v) { switch (v.type) { case FcTypeVoid: - printf (" <void>"); + printf ("<void>"); break; case FcTypeInteger: - printf (" %d(i)", v.u.i); + printf ("%d(i)", v.u.i); break; case FcTypeDouble: - printf (" %g(f)", v.u.d); + printf ("%g(f)", v.u.d); break; case FcTypeString: - printf (" \"%s\"", v.u.s); + printf ("\"%s\"", v.u.s); break; case FcTypeBool: - printf (" %s", v.u.b ? "FcTrue" : "FcFalse"); + printf ("%s", v.u.b ? "FcTrue" : "FcFalse"); break; case FcTypeMatrix: - printf (" (%f %f; %f %f)", v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy); + printf ("(%f %f; %f %f)", v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy); break; case FcTypeCharSet: /* XXX */ - printf (" "); FcCharSetPrint (v.u.c); break; case FcTypeLangSet: - printf (" "); FcLangSetPrint (v.u.l); break; case FcTypeFTFace: - printf (" face"); + printf ("face"); break; } } void +FcValuePrint (const FcValue v) +{ + printf (" "); + _FcValuePrint (v); +} + +void +FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark) +{ + if (show_pos_mark) + printf (" [insert here] "); + else + printf (" "); + _FcValuePrint (v); +} + +static void +FcValueBindingPrint (const FcValueListPtr l) +{ + switch (l->binding) { + case FcValueBindingWeak: + printf ("(w)"); + break; + case FcValueBindingStrong: + printf ("(s)"); + break; + case FcValueBindingSame: + printf ("(=)"); + break; + } +} + +void +FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos) +{ + for (; l != NULL; l = FcValueListNext(l)) + { + FcValuePrintWithPosition (FcValueCanonicalize (&l->value), pos != NULL && l == pos); + FcValueBindingPrint (l); + } + if (!pos) + printf (" [insert here]"); +} + +void FcValueListPrint (FcValueListPtr l) { for (; l != NULL; l = FcValueListNext(l)) { - FcValuePrint (FcValueCanonicalize(&l->value)); - switch (l->binding) { - case FcValueBindingWeak: - printf ("(w)"); - break; - case FcValueBindingStrong: - printf ("(s)"); - break; - case FcValueBindingSame: - printf ("(=)"); - break; - } + FcValuePrint (FcValueCanonicalize (&l->value)); + FcValueBindingPrint (l); } } |