Dirk, All, On 2013-05-17 14:42 +0200, Dirk Gouders spake thusly: > Submenus are sometimes empty and it would be nice if there is > something that notifies us that we should not expect any content > _before_ we enter a submenu. > > A new function menu_is_empty() was introduced and empty menus and > menuconfigs are now marked by "----" as opposed to non-empty > ones that are marked by "--->". > > This scheme was suggested by "Yann E. MORIN" <yann.morin.1998@xxxxxxx>. > > Signed-off-by: Dirk Gouders <dirk@xxxxxxxxxxx> > --- [--SNIP--] > diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c > index ccb71ae..80b289c 100644 > --- a/scripts/kconfig/mconf.c > +++ b/scripts/kconfig/mconf.c [--SNIP--] > @@ -497,9 +497,14 @@ static void build_conf(struct menu *menu) > item_make("%s%*c%s", > menu->data ? "-->" : "++>", > indent + 1, ' ', prompt); > - } else > - item_make(" %*c%s --->", indent + 1, ' ', prompt); > - > + } else { > + if (menu_is_empty(menu)) > + item_make(" %*c%s ----", > + indent + 1, ' ', prompt); > + else > + item_make(" %*c%s --->", > + indent + 1, ' ', prompt); > + } What about: item_make(" %*c%s %s", indent + 1, ' ', prompt, menu_is_empty(menu) ? "----" : "--->" ); [--SNIP--] > diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c > index dbf31ed..8b31180 100644 > --- a/scripts/kconfig/nconf.c > +++ b/scripts/kconfig/nconf.c [--SNIP--] > @@ -757,11 +757,18 @@ static void build_conf(struct menu *menu) > "%s%*c%s", > menu->data ? "-->" : "++>", > indent + 1, ' ', prompt); > - } else > - item_make(menu, 'm', > - " %*c%s --->", > - indent + 1, > - ' ', prompt); > + } else { > + if (menu_is_empty(menu)) > + item_make(menu, 'm', > + " %*c%s ----", > + indent + 1, > + ' ', prompt); > + else > + item_make(menu, 'm', > + " %*c%s --->", > + indent + 1, > + ' ', prompt); > + } Ditto. Otherwise, looks good to me. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html