MCPcopy Create free account
hub / github.com/coreboot/coreboot / expr_print_revdep

Function expr_print_revdep

util/kconfig/expr.c:1279–1296  ·  view source on GitHub ↗

* Transform the top level "||" tokens into newlines and prepend each * line with a minus. This makes expressions much easier to read. * Suitable for reverse dependency expressions. */

Source from the content-addressed store, hash-verified

1277 * Suitable for reverse dependency expressions.
1278 */
1279static void expr_print_revdep(struct expr *e,
1280 void (*fn)(void *, struct symbol *, const char *),
1281 void *data, tristate pr_type, const char **title)
1282{
1283 if (e->type == E_OR) {
1284 expr_print_revdep(e->left.expr, fn, data, pr_type, title);
1285 expr_print_revdep(e->right.expr, fn, data, pr_type, title);
1286 } else if (expr_calc_value(e) == pr_type) {
1287 if (*title) {
1288 fn(data, NULL, *title);
1289 *title = NULL;
1290 }
1291
1292 fn(data, NULL, " - ");
1293 expr_print(e, fn, data, E_NONE);
1294 fn(data, NULL, "\n");
1295 }
1296}
1297
1298void expr_gstr_print_revdep(struct expr *e, struct gstr *gs,
1299 tristate pr_type, const char *title)

Callers 1

expr_gstr_print_revdepFunction · 0.85

Calls 2

expr_calc_valueFunction · 0.85
expr_printFunction · 0.85

Tested by

no test coverage detected