summaryrefslogtreecommitdiff
path: root/kconfig/expr.h
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-10-17 12:47:53 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-10-17 12:47:53 (GMT)
commitf31bcd0026c2a3d5a38d3f16418876efcf7cd031 (patch)
treecd294553e433dde5ecceee767fcbf002f531aef1 /kconfig/expr.h
parentc54f4302cdd3f4b5e5fde5ab63001f263e0664a3 (diff)
Update the kconfig stuff to match the one in the linux-2.6.27 version.
/trunk/kconfig/zconf.hash.c | 225 110 115 0 +++---- /trunk/kconfig/lkc_proto.h | 4 3 1 0 + /trunk/kconfig/mconf.c | 217 110 107 0 +++--- /trunk/kconfig/menu.c | 86 60 26 0 ++- /trunk/kconfig/symbol.c | 212 156 56 0 ++++-- /trunk/kconfig/kconfig.mk | 24 9 15 0 - /trunk/kconfig/lex.zconf.c | 97 80 17 0 ++- /trunk/kconfig/util.c | 38 30 8 0 + /trunk/kconfig/lkc.h | 22 18 4 0 + /trunk/kconfig/expr.c | 32 19 13 0 + /trunk/kconfig/confdata.c | 254 172 82 0 +++++--- /trunk/kconfig/lxdialog/dialog.h | 12 9 3 0 + /trunk/kconfig/lxdialog/inputbox.c | 6 3 3 0 /trunk/kconfig/lxdialog/checklist.c | 4 2 2 0 /trunk/kconfig/lxdialog/menubox.c | 6 3 3 0 /trunk/kconfig/lxdialog/textbox.c | 2 1 1 0 /trunk/kconfig/lxdialog/util.c | 47 30 17 0 + /trunk/kconfig/lxdialog/yesno.c | 4 2 2 0 /trunk/kconfig/expr.h | 20 10 10 0 /trunk/kconfig/zconf.tab.c | 1441 793 648 0 ++++++++++++++++++++++++------------------- /trunk/kconfig/conf.c | 276 124 152 0 ++++---- /trunk/kconfig/check-gettext.sh | 14 14 0 0 + /trunk/ct-ng.in | 2 1 1 0 23 files changed, 1759 insertions(+), 1286 deletions(-)
Diffstat (limited to 'kconfig/expr.h')
-rw-r--r--kconfig/expr.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/kconfig/expr.h b/kconfig/expr.h
index 6084525..9d4cba1 100644
--- a/kconfig/expr.h
+++ b/kconfig/expr.h
@@ -25,14 +25,13 @@ struct file {
#define FILE_BUSY 0x0001
#define FILE_SCANNED 0x0002
-#define FILE_PRINTED 0x0004
typedef enum tristate {
no, mod, yes
} 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 {
@@ -45,9 +44,12 @@ struct expr {
union expr_data left, right;
};
-#define E_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2))
-#define E_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2))
-#define E_NOT(dep) (2-(dep))
+#define EXPR_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2))
+#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;
@@ -71,14 +73,12 @@ enum {
struct symbol {
struct symbol *next;
char *name;
- char *help;
enum symbol_type type;
struct symbol_value curr;
struct symbol_value def[4];
tristate visible;
int flags;
struct property *prop;
- struct expr *dep, *dep2;
struct expr_value rev_dep;
};
@@ -88,7 +88,6 @@ struct symbol {
#define SYMBOL_CHECK 0x0008
#define SYMBOL_CHOICE 0x0010
#define SYMBOL_CHOICEVAL 0x0020
-#define SYMBOL_PRINTED 0x0040
#define SYMBOL_VALID 0x0080
#define SYMBOL_OPTIONAL 0x0100
#define SYMBOL_WRITE 0x0200
@@ -107,7 +106,8 @@ struct symbol {
#define SYMBOL_HASHMASK 0xff
enum prop_type {
- P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, P_SELECT, P_RANGE
+ P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE,
+ P_SELECT, P_RANGE, P_ENV
};
struct property {
@@ -139,7 +139,7 @@ struct menu {
struct property *prompt;
struct expr *dep;
unsigned int flags;
- //char *help;
+ char *help;
struct file *file;
int lineno;
void *data;