Messages in this thread | | | Date | Tue, 31 Aug 2004 16:33:36 +0200 (CEST) | From | Roman Zippel <> | Subject | Re: [PATCH] Searching parameters in menuconfig |
| |
Hi,
On Tue, 31 Aug 2004, Yuval Turgeman wrote:
> Added support for searching parameters in make menuconfig. > Can be compiled with gcc-2.95 now...
Andrew already commented on the coding style, so I can skip that.
> +static struct menu *do_search(struct menu *menu, struct symbol *sym) > +{ > + struct menu *child, *ret; > + /* Ignore invisible menus ? > + if (!menu_is_visible(menu)) > + return NULL; > + */ > + > + if ( menu->sym ) { > + if ( menu->sym->name && !strcmp(menu->sym->name, sym->name )) { > + return menu; > + } > + } > + for (child = menu->list; child; child = child->next) { > + ret = do_search(child, sym); > + if ( ret ) return ret; > + } > + return NULL; > +}
You get to this information easier by iterating over the properties attached to a symbol (sym->prop) and a symbol can have multiple menu prompts, you show only the first one (which might not be the right one) and sym->prop->text might not even be a menu prompt at all. It would be nice to actually make it really useful, by first building a list of found symbols (and possibly allow wildcards for searching) and generate a menu of this. After a symbol is selected, build a new menu with all the prompts, which could also include the option to change parent symbols.
bye, Roman - 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/
| |