Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261638
b: refs/heads/master
c: eb4cf5a
h: refs/heads/master
v: v3
  • Loading branch information
Arnaud Lacombe authored and Michal Marek committed Jul 18, 2011
1 parent f3dffeb commit 32938dd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 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: a1e806550e566e987e06561873ab8276ee54d130
refs/heads/master: eb4cf5a642f6430cffff7ba5d8d9bd46ea409281
26 changes: 21 additions & 5 deletions trunk/scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,27 +487,43 @@ static struct conf_printer kconfig_printer_cb =
static void
header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
{
const char *suffix = "";

switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE:
case S_TRISTATE: {
const char *suffix = "";

switch (*value) {
case 'n':
return;
case 'm':
suffix = "_MODULE";
/* FALLTHROUGH */
/* fall through */
default:
value = "1";
}
fprintf(fp, "#define %s%s%s %s\n",
CONFIG_, sym->name, suffix, value);
break;
}
case S_HEX: {
const char *prefix = "";

if (value[0] != '0' || (value[1] != 'x' && value[1] != 'X'))
prefix = "0x";
fprintf(fp, "#define %s%s %s%s\n",
CONFIG_, sym->name, prefix, value);
break;
}
case S_STRING:
case S_INT:
fprintf(fp, "#define %s%s %s\n",
CONFIG_, sym->name, value);
break;
default:
break;
}

fprintf(fp, "#define %s%s%s %s\n",
CONFIG_, sym->name, suffix, value);
}

static void
Expand Down

0 comments on commit 32938dd

Please sign in to comment.