diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-07-15 06:01:05 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-07-15 06:01:05 +0000 |
commit | 837f058fb307e0bcf7b9ad4f02a44ea3047f427e (patch) | |
tree | bde5459d496b1afc91b7d4a261b66252a47ca414 /scripts/config/symbol.c | |
parent | 449f2bca967dc4682a52487fe4a53f13c3623002 (diff) |
Peter Kjellerstedt at axis.com writes:
Hello,
the attached patch should bring extra/config in line
with the Linux 2.6.7 sources.
The following are the commit messages for the respective
files from the Linux bk-repository:
checklist.c:
* fix menuconfig choice item help display
confdata.c:
* config: choice fix
* kconfig: don't rename target dir when saving config
expr.c, expr.h:
* config: disable debug prints
mconf.c:
* fix menuconfig choice item help display
menu.c:
* Kconfig: use select statements
symbol.c:
* config: choice fix
* Avoid bogus warning about recursive dependencies
* c99 struct initialiser conversions
textbox.c:
* janitor: don't init statics to 0
util.c:
* fix lxdialog behaviour
//Peter
Diffstat (limited to 'scripts/config/symbol.c')
-rw-r--r-- | scripts/config/symbol.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/scripts/config/symbol.c b/scripts/config/symbol.c index 29d8d3e0b..a9fae9c13 100644 --- a/scripts/config/symbol.c +++ b/scripts/config/symbol.c @@ -12,25 +12,26 @@ #include "lkc.h" struct symbol symbol_yes = { - name: "y", - curr: { "y", yes }, - flags: SYMBOL_YES|SYMBOL_VALID, + .name = "y", + .curr = { "y", yes }, + .flags = SYMBOL_YES|SYMBOL_VALID, }, symbol_mod = { - name: "m", - curr: { "m", mod }, - flags: SYMBOL_MOD|SYMBOL_VALID, + .name = "m", + .curr = { "m", mod }, + .flags = SYMBOL_MOD|SYMBOL_VALID, }, symbol_no = { - name: "n", - curr: { "n", no }, - flags: SYMBOL_NO|SYMBOL_VALID, + .name = "n", + .curr = { "n", no }, + .flags = SYMBOL_NO|SYMBOL_VALID, }, symbol_empty = { - name: "", - curr: { "", no }, - flags: SYMBOL_VALID, + .name = "", + .curr = { "", no }, + .flags = SYMBOL_VALID, }; int sym_change_count; struct symbol *modules_sym; +tristate modules_val; void sym_add_default(struct symbol *sym, const char *def) { @@ -72,11 +73,8 @@ enum symbol_type sym_get_type(struct symbol *sym) if (type == S_TRISTATE) { if (sym_is_choice_value(sym) && sym->visible == yes) type = S_BOOLEAN; - else { - sym_calc_value(modules_sym); - if (modules_sym->curr.tri == no) - type = S_BOOLEAN; - } + else if (modules_val == no) + type = S_BOOLEAN; } return type; } @@ -146,6 +144,8 @@ static void sym_calc_visibility(struct symbol *sym) prop->visible.tri = expr_calc_value(prop->visible.expr); tri = E_OR(tri, prop->visible.tri); } + if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) + tri = yes; if (sym->visible != tri) { sym->visible = tri; sym_set_changed(sym); @@ -155,6 +155,8 @@ static void sym_calc_visibility(struct symbol *sym) tri = no; if (sym->rev_dep.expr) tri = expr_calc_value(sym->rev_dep.expr); + if (tri == mod && sym_get_type(sym) == S_BOOLEAN) + tri = yes; if (sym->rev_dep.tri != tri) { sym->rev_dep.tri = tri; sym_set_changed(sym); @@ -261,14 +263,8 @@ void sym_calc_value(struct symbol *sym) newval.tri = expr_calc_value(prop->expr); } } - if (sym_get_type(sym) == S_BOOLEAN) { - if (newval.tri == mod) - newval.tri = yes; - if (sym->visible == mod) - sym->visible = yes; - if (sym->rev_dep.tri == mod) - sym->rev_dep.tri = yes; - } + if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) + newval.tri = yes; break; case S_STRING: case S_HEX: @@ -300,6 +296,8 @@ void sym_calc_value(struct symbol *sym) if (memcmp(&oldval, &sym->curr, sizeof(oldval))) sym_set_changed(sym); + if (modules_sym == sym) + modules_val = modules_sym->curr.tri; if (sym_is_choice(sym)) { int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE); @@ -320,6 +318,8 @@ void sym_clear_all_valid(void) for_all_symbols(i, sym) sym->flags &= ~SYMBOL_VALID; sym_change_count++; + if (modules_sym) + sym_calc_value(modules_sym); } void sym_set_changed(struct symbol *sym) @@ -699,7 +699,7 @@ struct symbol *sym_check_deps(struct symbol *sym) goto out; for (prop = sym->prop; prop; prop = prop->next) { - if (prop->type == P_CHOICE) + if (prop->type == P_CHOICE || prop->type == P_SELECT) continue; sym2 = sym_check_expr_deps(prop->visible.expr); if (sym2) |