projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kconfig: hide irrelevant sub-menus for oldconfig
[carl9170fw.git]
/
config
/
symbol.c
diff --git
a/config/symbol.c
b/config/symbol.c
index c9123ed2b791ad2de18450485f11ed15984cf448..0f7eba7d472a6a762e154bbcfede05b0ef8044db 100644
(file)
--- a/
config/symbol.c
+++ b/
config/symbol.c
@@
-183,7
+183,7
@@
static void sym_validate_range(struct symbol *sym)
sprintf(str, "%lld", val2);
else
sprintf(str, "0x%llx", val2);
sprintf(str, "%lld", val2);
else
sprintf(str, "0x%llx", val2);
- sym->curr.val = strdup(str);
+ sym->curr.val =
x
strdup(str);
}
static void sym_set_changed(struct symbol *sym)
}
static void sym_set_changed(struct symbol *sym)
@@
-371,11
+371,13
@@
void sym_calc_value(struct symbol *sym)
sym->curr.tri = no;
return;
}
sym->curr.tri = no;
return;
}
- if (!sym_is_choice_value(sym))
- sym->flags &= ~SYMBOL_WRITE;
+ sym->flags &= ~SYMBOL_WRITE;
sym_calc_visibility(sym);
sym_calc_visibility(sym);
+ if (sym->visible != no)
+ sym->flags |= SYMBOL_WRITE;
+
/* set default if recursively called */
sym->curr = newval;
/* set default if recursively called */
sym->curr = newval;
@@
-390,7
+392,6
@@
void sym_calc_value(struct symbol *sym)
/* if the symbol is visible use the user value
* if available, otherwise try the default value
*/
/* if the symbol is visible use the user value
* if available, otherwise try the default value
*/
- sym->flags |= SYMBOL_WRITE;
if (sym_has_value(sym)) {
newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri,
sym->visible);
if (sym_has_value(sym)) {
newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri,
sym->visible);
@@
-402,9
+403,10
@@
void sym_calc_value(struct symbol *sym)
if (!sym_is_choice(sym)) {
prop = sym_get_default_prop(sym);
if (prop) {
if (!sym_is_choice(sym)) {
prop = sym_get_default_prop(sym);
if (prop) {
- sym->flags |= SYMBOL_WRITE;
newval.tri = EXPR_AND(expr_calc_value(prop->expr),
prop->visible.tri);
newval.tri = EXPR_AND(expr_calc_value(prop->expr),
prop->visible.tri);
+ if (newval.tri != no)
+ sym->flags |= SYMBOL_WRITE;
}
if (sym->implied.tri != no) {
sym->flags |= SYMBOL_WRITE;
}
if (sym->implied.tri != no) {
sym->flags |= SYMBOL_WRITE;
@@
-433,12
+435,9
@@
void sym_calc_value(struct symbol *sym)
case S_STRING:
case S_HEX:
case S_INT:
case S_STRING:
case S_HEX:
case S_INT:
- if (sym->visible != no) {
- sym->flags |= SYMBOL_WRITE;
- if (sym_has_value(sym)) {
- newval.val = sym->def[S_DEF_USER].val;
- break;
- }
+ if (sym->visible != no && sym_has_value(sym)) {
+ newval.val = sym->def[S_DEF_USER].val;
+ break;
}
prop = sym_get_default_prop(sym);
if (prop) {
}
prop = sym_get_default_prop(sym);
if (prop) {
@@
-851,7
+850,7
@@
struct symbol *sym_lookup(const char *name, int flags)
: !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE))))
return symbol;
}
: !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE))))
return symbol;
}
- new_name = strdup(name);
+ new_name =
x
strdup(name);
} else {
new_name = NULL;
hash = 0;
} else {
new_name = NULL;
hash = 0;
@@
-901,7
+900,7
@@
struct symbol *sym_find(const char *name)
* name to be expanded shall be prefixed by a '$'. Unknown symbol expands to
* the empty string.
*/
* name to be expanded shall be prefixed by a '$'. Unknown symbol expands to
* the empty string.
*/
-c
onst c
har *sym_expand_string_value(const char *in)
+char *sym_expand_string_value(const char *in)
{
const char *src;
char *res;
{
const char *src;
char *res;
@@
-938,7
+937,7
@@
const char *sym_expand_string_value(const char *in)
newlen = strlen(res) + strlen(symval) + strlen(src) + 1;
if (newlen > reslen) {
reslen = newlen;
newlen = strlen(res) + strlen(symval) + strlen(src) + 1;
if (newlen > reslen) {
reslen = newlen;
- res = realloc(res, reslen);
+ res =
x
realloc(res, reslen);
}
strcat(res, symval);
}
strcat(res, symval);
@@
-1223,7
+1222,7
@@
static struct symbol *sym_check_expr_deps(struct expr *e)
default:
break;
}
default:
break;
}
-
printf(
"Oops! How to check %d?\n", e->type);
+
fprintf(stderr,
"Oops! How to check %d?\n", e->type);
return NULL;
}
return NULL;
}