summaryrefslogtreecommitdiff
path: root/scripts/kconfig/expr.h
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2008-01-14 04:50:23 +0100
committerSam Ravnborg <sam@ravnborg.org>2008-01-28 23:14:39 +0100
commit7a962923359768e04137125bd479fd0dfa6117d3 (patch)
tree9da466ba7ee1806bd40a53496533fc1f0ddd6cc2 /scripts/kconfig/expr.h
parent0ffce8d94487abbd332cd36f98db61b7c8a3db3c (diff)
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>
Diffstat (limited to 'scripts/kconfig/expr.h')
-rw-r--r--scripts/kconfig/expr.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 1ee8b1642d3b..b6f922c77e0b 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -31,7 +31,7 @@ typedef enum tristate {
} tristate;
enum expr_type {
- E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_CHOICE, E_SYMBOL, E_RANGE
+ E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_LIST, E_SYMBOL, E_RANGE
};
union expr_data {
@@ -48,6 +48,9 @@ struct expr {
#define EXPR_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2))
#define EXPR_NOT(dep) (2-(dep))
+#define expr_list_for_each_sym(l, e, s) \
+ for (e = (l); e && (s = e->right.sym); e = e->left.expr)
+
struct expr_value {
struct expr *expr;
tristate tri;