kconfig: remove noise from show_expr

From: Sam Ravnborg
Date: Thu Dec 30 2004 - 18:56:01 EST


# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/12/31 00:36:09+01:00 sam@xxxxxxxxxxxxxxxxx
# kconfig: remove noise from show_expr
#
# This makes readout more compact when searching for specific symbols
#
# Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
#
# scripts/kconfig/mconf.c
# 2004/12/31 00:35:50+01:00 sam@xxxxxxxxxxxxxxxxx +7 -17
# avoid printing empty information in show_expr
# increase buffer size in str_printf - people write that big text blocks
#
diff -Nru a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
--- a/scripts/kconfig/mconf.c 2004-12-31 00:45:40 +01:00
+++ b/scripts/kconfig/mconf.c 2004-12-31 00:45:40 +01:00
@@ -147,7 +147,7 @@
static void str_printf(struct gstr *gs, const char *fmt, ...)
{
va_list ap;
- char s[1024];
+ char s[4096];
va_start(ap, fmt);
vsnprintf(s, sizeof(s), fmt, ap);
str_add(gs, s);
@@ -347,34 +347,24 @@

static void show_expr(struct menu *menu, struct gstr *gs)
{
- bool hit = false;
- str_add(gs, "Depends:\n ");
if (menu->prompt->visible.expr) {
- if (!hit)
- hit = true;
+ str_add(gs, "\ndepends on:\n ");
expr_str(menu->prompt->visible.expr, gs);
}
- if (!hit)
- str_add(gs, "None");
if (menu->sym) {
struct property *prop;
- hit = false;
- str_add(gs, "\nSelects:\n ");
+ bool hit = false;
for_all_properties(menu->sym, prop, P_SELECT) {
- if (!hit)
+ if (!hit) {
+ str_add(gs, "\nselects:\n ");
hit = true;
+ }
expr_str(prop->expr, gs);
}
- if (!hit)
- str_add(gs, "None");
- hit = false;
- str_add(gs, "\nSelected by:\n ");
if (menu->sym->rev_dep.expr) {
- hit = true;
+ str_add(gs, "\nselected by:\n ");
expr_str(menu->sym->rev_dep.expr, gs);
}
- if (!hit)
- str_add(gs, "None");
}
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/