X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=config%2Fexpr.c;h=49376e12fa303df54ff84caa39863534a32657f5;hp=cd3a8f501f38e1c3d6290bd4c34572943e3fc793;hb=1b9db75182e45199d6d2bbc3bf9eeb5014a12947;hpb=3cde45725aaae3bce41e38cb1adbf692e46620ed diff --git a/config/expr.c b/config/expr.c index cd3a8f5..49376e1 100644 --- a/config/expr.c +++ b/config/expr.c @@ -1323,19 +1323,25 @@ void expr_gstr_print(struct expr *e, struct gstr *gs) */ static void expr_print_revdep(struct expr *e, void (*fn)(void *, struct symbol *, const char *), - void *data) + void *data, tristate pr_type, const char **title) { if (e->type == E_OR) { - expr_print_revdep(e->left.expr, fn, data); - expr_print_revdep(e->right.expr, fn, data); - } else { + expr_print_revdep(e->left.expr, fn, data, pr_type, title); + expr_print_revdep(e->right.expr, fn, data, pr_type, title); + } else if (expr_calc_value(e) == pr_type) { + if (*title) { + fn(data, NULL, *title); + *title = NULL; + } + fn(data, NULL, " - "); expr_print(e, fn, data, E_NONE); fn(data, NULL, "\n"); } } -void expr_gstr_print_revdep(struct expr *e, struct gstr *gs) +void expr_gstr_print_revdep(struct expr *e, struct gstr *gs, + tristate pr_type, const char *title) { - expr_print_revdep(e, expr_print_gstr_helper, gs); + expr_print_revdep(e, expr_print_gstr_helper, gs, pr_type, &title); }