summaryrefslogtreecommitdiffstats
path: root/package/config/zconf.y
diff options
context:
space:
mode:
authorThomas Petazzoni2010-08-21 17:00:49 +0200
committerThomas Petazzoni2010-09-01 12:26:49 +0200
commit52a142a6314905422f14f05fccafdce35bea7f08 (patch)
tree8eeda1ea9da4aade3e64d06306140f523c289700 /package/config/zconf.y
parentClean up our patches against kconfig (diff)
downloadbuildroot-52a142a6314905422f14f05fccafdce35bea7f08.tar.gz
buildroot-52a142a6314905422f14f05fccafdce35bea7f08.tar.xz
buildroot-52a142a6314905422f14f05fccafdce35bea7f08.zip
Bump package/config to 2.6.36-rc1
The goal is to be able to use savedefconfig to generate minimal defconfig files. Four of our patches are removed since the modifications have been merged upstream. The new nconf configuration utility has appeared. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/config/zconf.y')
-rw-r--r--package/config/zconf.y38
1 files changed, 27 insertions, 11 deletions
diff --git a/package/config/zconf.y b/package/config/zconf.y
index 62eee9cb8..956add165 100644
--- a/package/config/zconf.y
+++ b/package/config/zconf.y
@@ -14,8 +14,6 @@
#define LKC_DIRECT_LINK
#include "lkc.h"
-#include "zconf.hash.c"
-
#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
#define PRINTD 0x0001
@@ -29,7 +27,7 @@ static void zconf_error(const char *err, ...);
static void zconferror(const char *err);
static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
-struct symbol *symbol_hash[257];
+struct symbol *symbol_hash[SYMBOL_HASHSIZE];
static struct menu *current_menu, *current_entry;
@@ -100,6 +98,11 @@ static struct menu *current_menu, *current_entry;
menu_end_menu();
} if_entry menu_entry choice_entry
+%{
+/* Include zconf.hash.c here so it can see the token constants. */
+#include "zconf.hash.c"
+%}
+
%%
input: stmt_list;
@@ -472,7 +475,7 @@ void conf_parse(const char *name)
zconf_initscan(name);
sym_init();
- menu_init();
+ _menu_init();
modules_sym = sym_lookup(NULL, 0);
modules_sym->type = S_BOOLEAN;
modules_sym->flags |= SYMBOL_AUTO;
@@ -501,7 +504,7 @@ void conf_parse(const char *name)
sym_set_change_count(1);
}
-const char *zconf_tokenname(int token)
+static const char *zconf_tokenname(int token)
{
switch (token) {
case T_MENU: return "menu";
@@ -565,7 +568,7 @@ static void zconferror(const char *err)
#endif
}
-void print_quoted_string(FILE *out, const char *str)
+static void print_quoted_string(FILE *out, const char *str)
{
const char *p;
int len;
@@ -582,15 +585,15 @@ void print_quoted_string(FILE *out, const char *str)
putc('"', out);
}
-void print_symbol(FILE *out, struct menu *menu)
+static void print_symbol(FILE *out, struct menu *menu)
{
struct symbol *sym = menu->sym;
struct property *prop;
if (sym_is_choice(sym))
- fprintf(out, "choice\n");
+ fprintf(out, "\nchoice\n");
else
- fprintf(out, "config %s\n", sym->name);
+ fprintf(out, "\nconfig %s\n", sym->name);
switch (sym->type) {
case S_BOOLEAN:
fputs(" boolean\n", out);
@@ -636,6 +639,21 @@ void print_symbol(FILE *out, struct menu *menu)
case P_CHOICE:
fputs(" #choice value\n", out);
break;
+ case P_SELECT:
+ fputs( " select ", out);
+ expr_fprint(prop->expr, out);
+ fputc('\n', out);
+ break;
+ case P_RANGE:
+ fputs( " range ", out);
+ expr_fprint(prop->expr, out);
+ fputc('\n', out);
+ break;
+ case P_MENU:
+ fputs( " menu ", out);
+ print_quoted_string(out, prop->text);
+ fputc('\n', out);
+ break;
default:
fprintf(out, " unknown prop %d!\n", prop->type);
break;
@@ -647,7 +665,6 @@ void print_symbol(FILE *out, struct menu *menu)
menu->help[len] = 0;
fprintf(out, " help\n%s\n", menu->help);
}
- fputc('\n', out);
}
void zconfdump(FILE *out)
@@ -680,7 +697,6 @@ void zconfdump(FILE *out)
expr_fprint(prop->visible.expr, out);
fputc('\n', out);
}
- fputs("\n", out);
}
if (menu->list)