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

Function expr_print_revdep

scripts/config/expr.c:1280–1297  ·  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

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