Messages in this thread Patch in this message | | | Date | Fri, 31 Dec 2004 00:52:45 +0100 | From | Sam Ravnborg <> | Subject | kconfig: remove noise from show_expr |
| |
# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/12/31 00:36:09+01:00 sam@mars.ravnborg.org # kconfig: remove noise from show_expr # # This makes readout more compact when searching for specific symbols # # Signed-off-by: Sam Ravnborg <sam@ravnborg.org> # # scripts/kconfig/mconf.c # 2004/12/31 00:35:50+01:00 sam@mars.ravnborg.org +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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |