aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcdbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig/src/fcdbg.c')
-rw-r--r--fontconfig/src/fcdbg.c39
1 files changed, 28 insertions, 11 deletions
diff --git a/fontconfig/src/fcdbg.c b/fontconfig/src/fcdbg.c
index ce642140c..d74bc2769 100644
--- a/fontconfig/src/fcdbg.c
+++ b/fontconfig/src/fcdbg.c
@@ -427,21 +427,38 @@ FcEditPrint (const FcEdit *edit)
void
FcSubstPrint (const FcSubst *subst)
{
- FcEdit *e;
- FcTest *t;
+ FcRule *r;
+ FcRuleType last_type = FcRuleUnknown;
printf ("match\n");
- for (t = subst->test; t; t = t->next)
- {
- printf ("\t");
- FcTestPrint (t);
- }
- printf ("edit\n");
- for (e = subst->edit; e; e = e->next)
+ for (r = subst->rule; r; r = r->next)
{
+ if (last_type != r->type)
+ {
+ switch (r->type) {
+ case FcRuleTest:
+ printf ("[test]\n");
+ break;
+ case FcRuleEdit:
+ printf ("[edit]\n");
+ break;
+ default:
+ break;
+ }
+ last_type = r->type;
+ }
printf ("\t");
- FcEditPrint (e);
- printf (";\n");
+ switch (r->type) {
+ case FcRuleTest:
+ FcTestPrint (r->u.test);
+ break;
+ case FcRuleEdit:
+ FcEditPrint (r->u.edit);
+ printf (";\n");
+ break;
+ default:
+ break;
+ }
}
printf ("\n");
}