lkml.org 
[lkml]   [2004]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.038 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site