mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: Yuval Turgeman <yuvalt@gmail.com>
Cc: sam@ravnborg.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Searching parameters in menuconfig
Date: Tue, 31 Aug 2004 16:33:36 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.61.0408311427110.981@scrub.home> (raw)
In-Reply-To: <9ae345c0040831005257c245da@mail.gmail.com>

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

  parent reply	other threads:[~2004-08-31 14:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31  7:52 Yuval Turgeman
2004-08-31  9:08 ` Andrew Morton
2004-08-31 14:33 ` Roman Zippel [this message]
2004-08-31 15:12   ` Yuval Turgeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0408311427110.981@scrub.home \
    --to=zippel@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=yuvalt@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®