kconfig: explicitly introduce expression list

Rename E_CHOICE to E_LIST to explicitly add support for expression
lists. Add a helper macro expr_list_for_each_sym to more easily iterate
over the list.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
Roman Zippel
2008-01-14 04:50:23 +01:00
committed by Sam Ravnborg
parent 0ffce8d944
commit 7a96292335
5 changed files with 24 additions and 20 deletions

View File

@@ -312,7 +312,7 @@ load:
int conf_read(const char *name)
{
struct symbol *sym;
struct symbol *sym, *choice_sym;
struct property *prop;
struct expr *e;
int i, flags;
@@ -353,9 +353,9 @@ int conf_read(const char *name)
*/
prop = sym_get_choice_prop(sym);
flags = sym->flags;
for (e = prop->expr; e; e = e->left.expr)
if (e->right.sym->visible != no)
flags &= e->right.sym->flags;
expr_list_for_each_sym(prop->expr, e, choice_sym)
if (choice_sym->visible != no)
flags &= choice_sym->flags;
sym->flags &= flags | ~SYMBOL_DEF_USER;
}