mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-30 11:04:25 +00:00
kconfig: rename E_OR & friends to avoid name clash
We had macros named the same as a set of enumeration values. It is legal code but very confusing to read - so rename the macros from E_* to EXPR_* Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
This commit is contained in:
parent
d84876f9f8
commit
d6ee35764f
4 changed files with 10 additions and 10 deletions
|
@ -300,7 +300,7 @@ load:
|
||||||
cs->def[def].val = sym;
|
cs->def[def].val = sym;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
cs->def[def].tri = E_OR(cs->def[def].tri, sym->def[def].tri);
|
cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
|
|
@ -955,14 +955,14 @@ tristate expr_calc_value(struct expr *e)
|
||||||
case E_AND:
|
case E_AND:
|
||||||
val1 = expr_calc_value(e->left.expr);
|
val1 = expr_calc_value(e->left.expr);
|
||||||
val2 = expr_calc_value(e->right.expr);
|
val2 = expr_calc_value(e->right.expr);
|
||||||
return E_AND(val1, val2);
|
return EXPR_AND(val1, val2);
|
||||||
case E_OR:
|
case E_OR:
|
||||||
val1 = expr_calc_value(e->left.expr);
|
val1 = expr_calc_value(e->left.expr);
|
||||||
val2 = expr_calc_value(e->right.expr);
|
val2 = expr_calc_value(e->right.expr);
|
||||||
return E_OR(val1, val2);
|
return EXPR_OR(val1, val2);
|
||||||
case E_NOT:
|
case E_NOT:
|
||||||
val1 = expr_calc_value(e->left.expr);
|
val1 = expr_calc_value(e->left.expr);
|
||||||
return E_NOT(val1);
|
return EXPR_NOT(val1);
|
||||||
case E_EQUAL:
|
case E_EQUAL:
|
||||||
sym_calc_value(e->left.sym);
|
sym_calc_value(e->left.sym);
|
||||||
sym_calc_value(e->right.sym);
|
sym_calc_value(e->right.sym);
|
||||||
|
|
|
@ -45,9 +45,9 @@ struct expr {
|
||||||
union expr_data left, right;
|
union expr_data left, right;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define E_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2))
|
#define EXPR_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2))
|
||||||
#define E_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2))
|
#define EXPR_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2))
|
||||||
#define E_NOT(dep) (2-(dep))
|
#define EXPR_NOT(dep) (2-(dep))
|
||||||
|
|
||||||
struct expr_value {
|
struct expr_value {
|
||||||
struct expr *expr;
|
struct expr *expr;
|
||||||
|
|
|
@ -199,7 +199,7 @@ static void sym_calc_visibility(struct symbol *sym)
|
||||||
tri = no;
|
tri = no;
|
||||||
for_all_prompts(sym, prop) {
|
for_all_prompts(sym, prop) {
|
||||||
prop->visible.tri = expr_calc_value(prop->visible.expr);
|
prop->visible.tri = expr_calc_value(prop->visible.expr);
|
||||||
tri = E_OR(tri, prop->visible.tri);
|
tri = EXPR_OR(tri, prop->visible.tri);
|
||||||
}
|
}
|
||||||
if (tri == mod && (sym->type != S_TRISTATE || modules_val == no))
|
if (tri == mod && (sym->type != S_TRISTATE || modules_val == no))
|
||||||
tri = yes;
|
tri = yes;
|
||||||
|
@ -303,7 +303,7 @@ void sym_calc_value(struct symbol *sym)
|
||||||
if (sym_is_choice_value(sym) && sym->visible == yes) {
|
if (sym_is_choice_value(sym) && sym->visible == yes) {
|
||||||
prop = sym_get_choice_prop(sym);
|
prop = sym_get_choice_prop(sym);
|
||||||
newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no;
|
newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no;
|
||||||
} else if (E_OR(sym->visible, sym->rev_dep.tri) != no) {
|
} else if (EXPR_OR(sym->visible, sym->rev_dep.tri) != no) {
|
||||||
sym->flags |= SYMBOL_WRITE;
|
sym->flags |= SYMBOL_WRITE;
|
||||||
if (sym_has_value(sym))
|
if (sym_has_value(sym))
|
||||||
newval.tri = sym->def[S_DEF_USER].tri;
|
newval.tri = sym->def[S_DEF_USER].tri;
|
||||||
|
@ -312,7 +312,7 @@ void sym_calc_value(struct symbol *sym)
|
||||||
if (prop)
|
if (prop)
|
||||||
newval.tri = expr_calc_value(prop->expr);
|
newval.tri = expr_calc_value(prop->expr);
|
||||||
}
|
}
|
||||||
newval.tri = E_OR(E_AND(newval.tri, sym->visible), sym->rev_dep.tri);
|
newval.tri = EXPR_OR(EXPR_AND(newval.tri, sym->visible), sym->rev_dep.tri);
|
||||||
} else if (!sym_is_choice(sym)) {
|
} else if (!sym_is_choice(sym)) {
|
||||||
prop = sym_get_default_prop(sym);
|
prop = sym_get_default_prop(sym);
|
||||||
if (prop) {
|
if (prop) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue