Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261616
b: refs/heads/master
c: d8fc320
h: refs/heads/master
v: v3
  • Loading branch information
Arnaud Lacombe committed Jun 6, 2011
1 parent 2e7f1f2 commit 4feb355
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a61944c251c3e68c4bbf6eb96ff61c7b286351c5
refs/heads/master: d8fc320079b46cf462897148f48d4a63f37f56ce
4 changes: 4 additions & 0 deletions trunk/scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
return 0;
}
check_stdin();
/* fall through */
case oldaskconfig:
fflush(stdout);
xfgets(line, 128, stdin);
Expand Down Expand Up @@ -150,6 +151,7 @@ static int conf_string(struct menu *menu)
def = NULL;
break;
}
/* fall through */
default:
line[strlen(line)-1] = 0;
def = line;
Expand Down Expand Up @@ -304,6 +306,7 @@ static int conf_choice(struct menu *menu)
break;
}
check_stdin();
/* fall through */
case oldaskconfig:
fflush(stdout);
xfgets(line, 128, stdin);
Expand Down Expand Up @@ -369,6 +372,7 @@ static void conf(struct menu *menu)
check_conf(menu);
return;
}
/* fall through */
case P_COMMENT:
prompt = menu_get_prompt(menu);
if (prompt)
Expand Down
32 changes: 5 additions & 27 deletions trunk/scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
sym->flags |= def_flags;
break;
}
/* fall through */
case S_BOOLEAN:
if (p[0] == 'y') {
sym->def[def].tri = yes;
Expand All @@ -148,6 +149,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
sym->type = S_STRING;
goto done;
}
/* fall through */
case S_STRING:
if (*p++ != '"')
break;
Expand All @@ -162,6 +164,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
conf_warning("invalid string found");
return 1;
}
/* fall through */
case S_INT:
case S_HEX:
done:
Expand Down Expand Up @@ -237,6 +240,7 @@ int conf_read_simple(const char *name, int def)
case S_STRING:
if (sym->def[def].val)
free(sym->def[def].val);
/* fall through */
default:
sym->def[def].val = NULL;
sym->def[def].tri = no;
Expand Down Expand Up @@ -363,6 +367,7 @@ int conf_read(const char *name)
break;
if (!sym_is_choice(sym))
goto sym_ok;
/* fall through */
default:
if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
goto sym_ok;
Expand Down Expand Up @@ -768,29 +773,6 @@ static int conf_split_config(void)
return res;
}

static void conf_write_function_autoconf(FILE *out, char* conf, char* name,
int val)
{
char c;
char *tmp, *d;

d = strdup(conf);
tmp = d;
while ((c = *conf++))
*d++ = tolower(c);

fprintf(out, "#define %sis_", tmp);
free(tmp);

d = strdup(name);
tmp = d;
while ((c = *name++))
*d++ = tolower(c);
fprintf(out, "%s%s() %d\n", tmp, (val > 1) ? "_module" : "",
val ? 1 : 0);
free(tmp);
}

int conf_write_autoconf(void)
{
struct symbol *sym;
Expand Down Expand Up @@ -838,7 +820,6 @@ int conf_write_autoconf(void)
rootmenu.prompt->text);

for_all_symbols(i, sym) {
int fct_val = 0;
sym_calc_value(sym);
if (!(sym->flags & SYMBOL_WRITE) || !sym->name)
continue;
Expand All @@ -858,18 +839,15 @@ int conf_write_autoconf(void)
CONFIG_, sym->name);
fprintf(out_h, "#define %s%s_MODULE 1\n",
CONFIG_, sym->name);
fct_val = 2;
break;
case yes:
if (sym->type == S_TRISTATE)
fprintf(tristate,"%s%s=Y\n",
CONFIG_, sym->name);
fprintf(out_h, "#define %s%s 1\n",
CONFIG_, sym->name);
fct_val = 1;
break;
}
conf_write_function_autoconf(out_h, CONFIG_, sym->name, fct_val);
break;
case S_STRING:
conf_write_string(true, sym->name, sym_get_string_value(sym), out_h);
Expand Down
1 change: 1 addition & 0 deletions trunk/scripts/kconfig/gconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,7 @@ static gchar **fill_row(struct menu *menu)
row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
if (sym_is_choice(sym))
break;
/* fall through */
case S_TRISTATE:
val = sym_get_tristate_value(sym);
switch (val) {
Expand Down
1 change: 1 addition & 0 deletions trunk/scripts/kconfig/mconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@ int main(int ac, char **av)
"\n\n"));
return 1;
}
/* fall through */
case -1:
printf(_("\n\n"
"*** End of the configuration.\n"
Expand Down

0 comments on commit 4feb355

Please sign in to comment.