summaryrefslogtreecommitdiffstats
path: root/package/config/expr.c
diff options
context:
space:
mode:
authorAlper Yildirim <ayildirim@aselsan.com>2009-07-20 18:50:58 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2009-07-27 16:06:50 +0200
commit4b3e11b3e7d00881878f45cddbfe8f4bf07d1ebe (patch)
tree3740632b5196497242055f7ecdfe4be3c6210409 /package/config/expr.c
parentea536503331aea875e84ae598b4610fbd059f167 (diff)
downloadbuildroot-novena-4b3e11b3e7d00881878f45cddbfe8f4bf07d1ebe.tar.gz
buildroot-novena-4b3e11b3e7d00881878f45cddbfe8f4bf07d1ebe.zip
config: Update package/config to Kconfig 2.6.30
Update the package/config stuff with the code available in the Linux kernel 2.6.30. Signed-off-by: Alper Yildirim <ayildirim@aselsan.com>
Diffstat (limited to 'package/config/expr.c')
-rw-r--r--package/config/expr.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/package/config/expr.c b/package/config/expr.c
index 5861468bc..392c7e94f 100644
--- a/package/config/expr.c
+++ b/package/config/expr.c
@@ -87,7 +87,7 @@ struct expr *expr_copy(struct expr *org)
break;
case E_AND:
case E_OR:
- case E_CHOICE:
+ case E_LIST:
e->left.expr = expr_copy(org->left.expr);
e->right.expr = expr_copy(org->right.expr);
break;
@@ -217,7 +217,7 @@ int expr_eq(struct expr *e1, struct expr *e2)
expr_free(e2);
trans_count = old_count;
return res;
- case E_CHOICE:
+ case E_LIST:
case E_RANGE:
case E_NONE:
/* panic */;
@@ -648,7 +648,7 @@ struct expr *expr_transform(struct expr *e)
case E_EQUAL:
case E_UNEQUAL:
case E_SYMBOL:
- case E_CHOICE:
+ case E_LIST:
break;
default:
e->left.expr = expr_transform(e->left.expr);
@@ -932,7 +932,7 @@ struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symb
break;
case E_SYMBOL:
return expr_alloc_comp(type, e->left.sym, sym);
- case E_CHOICE:
+ case E_LIST:
case E_RANGE:
case E_NONE:
/* panic */;
@@ -955,14 +955,14 @@ tristate expr_calc_value(struct expr *e)
case E_AND:
val1 = expr_calc_value(e->left.expr);
val2 = expr_calc_value(e->right.expr);
- return E_AND(val1, val2);
+ return EXPR_AND(val1, val2);
case E_OR:
val1 = expr_calc_value(e->left.expr);
val2 = expr_calc_value(e->right.expr);
- return E_OR(val1, val2);
+ return EXPR_OR(val1, val2);
case E_NOT:
val1 = expr_calc_value(e->left.expr);
- return E_NOT(val1);
+ return EXPR_NOT(val1);
case E_EQUAL:
sym_calc_value(e->left.sym);
sym_calc_value(e->right.sym);
@@ -1000,9 +1000,9 @@ int expr_compare_type(enum expr_type t1, enum expr_type t2)
if (t2 == E_OR)
return 1;
case E_OR:
- if (t2 == E_CHOICE)
+ if (t2 == E_LIST)
return 1;
- case E_CHOICE:
+ case E_LIST:
if (t2 == 0)
return 1;
default:
@@ -1034,12 +1034,18 @@ void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *
expr_print(e->left.expr, fn, data, E_NOT);
break;
case E_EQUAL:
- fn(data, e->left.sym, e->left.sym->name);
+ if (e->left.sym->name)
+ fn(data, e->left.sym, e->left.sym->name);
+ else
+ fn(data, NULL, "<choice>");
fn(data, NULL, "=");
fn(data, e->right.sym, e->right.sym->name);
break;
case E_UNEQUAL:
- fn(data, e->left.sym, e->left.sym->name);
+ if (e->left.sym->name)
+ fn(data, e->left.sym, e->left.sym->name);
+ else
+ fn(data, NULL, "<choice>");
fn(data, NULL, "!=");
fn(data, e->right.sym, e->right.sym->name);
break;
@@ -1053,11 +1059,11 @@ void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *
fn(data, NULL, " && ");
expr_print(e->right.expr, fn, data, E_AND);
break;
- case E_CHOICE:
+ case E_LIST:
fn(data, e->right.sym, e->right.sym->name);
if (e->left.expr) {
fn(data, NULL, " ^ ");
- expr_print(e->left.expr, fn, data, E_CHOICE);
+ expr_print(e->left.expr, fn, data, E_LIST);
}
break;
case E_RANGE: