diff options
| author | Michal Marek <mmarek@suse.cz> | 2010-09-27 17:24:53 -0400 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2010-09-27 17:24:53 -0400 |
| commit | 0455029bea7da2a2a92003238c9617a36d5d48fd (patch) | |
| tree | 5dd4935db441dd443f38846236a8b353c9a92da1 /scripts | |
| parent | 8c41e5e363db55d91aa3b1cdce4ab02ad9821de7 (diff) | |
| parent | 838a2e55e6a4e9e8a10451ed2ef0f7a08dabdb04 (diff) | |
Merge branch 'kbuild/kconfig/kbuild-generic-v7' of http://github.com/lacombar/linux-2.6 into kbuild/kconfig
* 'kbuild/kconfig/kbuild-generic-v7' of http://github.com/lacombar/linux-2.6:
kbuild: migrate all arch to the kconfig mainmenu upgrade
kconfig: expand file names
kconfig: use the file's name of sourced file
kconfig: constify file name
kconfig: don't emit warning upon rootmenu's prompt redefinition
kconfig: replace KERNELVERSION usage by the mainmenu's prompt
kconfig: delay gconf window initialization
kconfig: expand by default the rootmenu's prompt
kconfig: add a symbol string expansion helper
kconfig: regen parser
kconfig: implement the `mainmenu' directive
kconfig: allow PACKAGE to be defined on the compiler's command-line
kconfig: rephrase help texts/comments not to include the package name
kconfig: allow build-time definition of the internal config prefix
kconfig: rephrase help text not to mention the internal prefix
kconfig: replace a `switch()' statement by a more flexible `if()' statement
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/kconfig/Makefile | 2 | ||||
| -rw-r--r-- | scripts/kconfig/conf.c | 13 | ||||
| -rw-r--r-- | scripts/kconfig/confdata.c | 81 | ||||
| -rw-r--r-- | scripts/kconfig/expr.h | 2 | ||||
| -rw-r--r-- | scripts/kconfig/gconf.c | 20 | ||||
| -rw-r--r-- | scripts/kconfig/lex.zconf.c_shipped | 7 | ||||
| -rw-r--r-- | scripts/kconfig/lkc.h | 8 | ||||
| -rw-r--r-- | scripts/kconfig/lkc_proto.h | 1 | ||||
| -rw-r--r-- | scripts/kconfig/mconf.c | 64 | ||||
| -rw-r--r-- | scripts/kconfig/menu.c | 6 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.c | 73 | ||||
| -rw-r--r-- | scripts/kconfig/qconf.cc | 6 | ||||
| -rw-r--r-- | scripts/kconfig/symbol.c | 49 | ||||
| -rw-r--r-- | scripts/kconfig/util.c | 7 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.l | 7 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.tab.c_shipped | 547 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.y | 18 |
17 files changed, 488 insertions, 423 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 3fbfe98be2b5..368ae306aee4 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
| @@ -8,7 +8,7 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-c | |||
| 8 | ifdef KBUILD_KCONFIG | 8 | ifdef KBUILD_KCONFIG |
| 9 | Kconfig := $(KBUILD_KCONFIG) | 9 | Kconfig := $(KBUILD_KCONFIG) |
| 10 | else | 10 | else |
| 11 | Kconfig := arch/$(SRCARCH)/Kconfig | 11 | Kconfig := Kconfig |
| 12 | endif | 12 | endif |
| 13 | 13 | ||
| 14 | xconfig: $(obj)/qconf | 14 | xconfig: $(obj)/qconf |
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index d56131c0b3c5..eba5906dc4ab 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
| @@ -425,7 +425,7 @@ static void check_conf(struct menu *menu) | |||
| 425 | (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { | 425 | (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { |
| 426 | if (input_mode == listnewconfig) { | 426 | if (input_mode == listnewconfig) { |
| 427 | if (sym->name && !sym_is_choice_value(sym)) { | 427 | if (sym->name && !sym_is_choice_value(sym)) { |
| 428 | printf("CONFIG_%s\n", sym->name); | 428 | printf("%s%s\n", CONFIG_, sym->name); |
| 429 | } | 429 | } |
| 430 | } else if (input_mode != oldnoconfig) { | 430 | } else if (input_mode != oldnoconfig) { |
| 431 | if (!conf_cnt++) | 431 | if (!conf_cnt++) |
| @@ -508,8 +508,7 @@ int main(int ac, char **av) | |||
| 508 | name = conf_get_configname(); | 508 | name = conf_get_configname(); |
| 509 | if (stat(name, &tmpstat)) { | 509 | if (stat(name, &tmpstat)) { |
| 510 | fprintf(stderr, _("***\n" | 510 | fprintf(stderr, _("***\n" |
| 511 | "*** You have not yet configured your kernel!\n" | 511 | "*** Configuration file \"%s\" not found!\n" |
| 512 | "*** (missing kernel config file \"%s\")\n" | ||
| 513 | "***\n" | 512 | "***\n" |
| 514 | "*** Please run some configurator (e.g. \"make oldconfig\" or\n" | 513 | "*** Please run some configurator (e.g. \"make oldconfig\" or\n" |
| 515 | "*** \"make menuconfig\" or \"make xconfig\").\n" | 514 | "*** \"make menuconfig\" or \"make xconfig\").\n" |
| @@ -571,7 +570,7 @@ int main(int ac, char **av) | |||
| 571 | name = getenv("KCONFIG_NOSILENTUPDATE"); | 570 | name = getenv("KCONFIG_NOSILENTUPDATE"); |
| 572 | if (name && *name) { | 571 | if (name && *name) { |
| 573 | fprintf(stderr, | 572 | fprintf(stderr, |
| 574 | _("\n*** Kernel configuration requires explicit update.\n\n")); | 573 | _("\n*** The configuration requires explicit update.\n\n")); |
| 575 | return 1; | 574 | return 1; |
| 576 | } | 575 | } |
| 577 | } | 576 | } |
| @@ -623,11 +622,11 @@ int main(int ac, char **av) | |||
| 623 | * All other commands are only used to generate a config. | 622 | * All other commands are only used to generate a config. |
| 624 | */ | 623 | */ |
| 625 | if (conf_get_changed() && conf_write(NULL)) { | 624 | if (conf_get_changed() && conf_write(NULL)) { |
| 626 | fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); | 625 | fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); |
| 627 | exit(1); | 626 | exit(1); |
| 628 | } | 627 | } |
| 629 | if (conf_write_autoconf()) { | 628 | if (conf_write_autoconf()) { |
| 630 | fprintf(stderr, _("\n*** Error during update of the kernel configuration.\n\n")); | 629 | fprintf(stderr, _("\n*** Error during update of the configuration.\n\n")); |
| 631 | return 1; | 630 | return 1; |
| 632 | } | 631 | } |
| 633 | } else if (input_mode == savedefconfig) { | 632 | } else if (input_mode == savedefconfig) { |
| @@ -638,7 +637,7 @@ int main(int ac, char **av) | |||
| 638 | } | 637 | } |
| 639 | } else if (input_mode != listnewconfig) { | 638 | } else if (input_mode != listnewconfig) { |
| 640 | if (conf_write(NULL)) { | 639 | if (conf_write(NULL)) { |
| 641 | fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); | 640 | fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); |
| 642 | exit(1); | 641 | exit(1); |
| 643 | } | 642 | } |
| 644 | } | 643 | } |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index dc11d51bd8b3..f7d89d7065b7 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
| @@ -221,24 +221,23 @@ load: | |||
| 221 | while (fgets(line, sizeof(line), in)) { | 221 | while (fgets(line, sizeof(line), in)) { |
| 222 | conf_lineno++; | 222 | conf_lineno++; |
| 223 | sym = NULL; | 223 | sym = NULL; |
| 224 | switch (line[0]) { | 224 | if (line[0] == '#') { |
| 225 | case '#': | 225 | if (memcmp(line + 2, CONFIG_, strlen(CONFIG_))) |
| 226 | if (memcmp(line + 2, "CONFIG_", 7)) | ||
| 227 | continue; | 226 | continue; |
| 228 | p = strchr(line + 9, ' '); | 227 | p = strchr(line + 2 + strlen(CONFIG_), ' '); |
| 229 | if (!p) | 228 | if (!p) |
| 230 | continue; | 229 | continue; |
| 231 | *p++ = 0; | 230 | *p++ = 0; |
| 232 | if (strncmp(p, "is not set", 10)) | 231 | if (strncmp(p, "is not set", 10)) |
| 233 | continue; | 232 | continue; |
| 234 | if (def == S_DEF_USER) { | 233 | if (def == S_DEF_USER) { |
| 235 | sym = sym_find(line + 9); | 234 | sym = sym_find(line + 2 + strlen(CONFIG_)); |
| 236 | if (!sym) { | 235 | if (!sym) { |
| 237 | sym_add_change_count(1); | 236 | sym_add_change_count(1); |
| 238 | break; | 237 | break; |
| 239 | } | 238 | } |
| 240 | } else { | 239 | } else { |
| 241 | sym = sym_lookup(line + 9, 0); | 240 | sym = sym_lookup(line + 2 + strlen(CONFIG_), 0); |
| 242 | if (sym->type == S_UNKNOWN) | 241 | if (sym->type == S_UNKNOWN) |
| 243 | sym->type = S_BOOLEAN; | 242 | sym->type = S_BOOLEAN; |
| 244 | } | 243 | } |
| @@ -254,13 +253,8 @@ load: | |||
| 254 | default: | 253 | default: |
| 255 | ; | 254 | ; |
| 256 | } | 255 | } |
| 257 | break; | 256 | } else if (memcmp(line, CONFIG_, strlen(CONFIG_)) == 0) { |
| 258 | case 'C': | 257 | p = strchr(line + strlen(CONFIG_), '='); |
| 259 | if (memcmp(line, "CONFIG_", 7)) { | ||
| 260 | conf_warning("unexpected data"); | ||
| 261 | continue; | ||
| 262 | } | ||
| 263 | p = strchr(line + 7, '='); | ||
| 264 | if (!p) | 258 | if (!p) |
| 265 | continue; | 259 | continue; |
| 266 | *p++ = 0; | 260 | *p++ = 0; |
| @@ -271,13 +265,13 @@ load: | |||
| 271 | *p2 = 0; | 265 | *p2 = 0; |
| 272 | } | 266 | } |
| 273 | if (def == S_DEF_USER) { | 267 | if (def == S_DEF_USER) { |
| 274 | sym = sym_find(line + 7); | 268 | sym = sym_find(line + strlen(CONFIG_)); |
| 275 | if (!sym) { | 269 | if (!sym) { |
| 276 | sym_add_change_count(1); | 270 | sym_add_change_count(1); |
| 277 | break; | 271 | break; |
| 278 | } | 272 | } |
| 279 | } else { | 273 | } else { |
| 280 | sym = sym_lookup(line + 7, 0); | 274 | sym = sym_lookup(line + strlen(CONFIG_), 0); |
| 281 | if (sym->type == S_UNKNOWN) | 275 | if (sym->type == S_UNKNOWN) |
| 282 | sym->type = S_OTHER; | 276 | sym->type = S_OTHER; |
| 283 | } | 277 | } |
| @@ -286,12 +280,9 @@ load: | |||
| 286 | } | 280 | } |
| 287 | if (conf_set_sym_val(sym, def, def_flags, p)) | 281 | if (conf_set_sym_val(sym, def, def_flags, p)) |
| 288 | continue; | 282 | continue; |
| 289 | break; | 283 | } else { |
| 290 | case '\r': | 284 | if (line[0] != '\r' && line[0] != '\n') |
| 291 | case '\n': | 285 | conf_warning("unexpected data"); |
| 292 | break; | ||
| 293 | default: | ||
| 294 | conf_warning("unexpected data"); | ||
| 295 | continue; | 286 | continue; |
| 296 | } | 287 | } |
| 297 | if (sym && sym_is_choice_value(sym)) { | 288 | if (sym && sym_is_choice_value(sym)) { |
| @@ -406,9 +397,9 @@ static void conf_write_string(bool headerfile, const char *name, | |||
| 406 | { | 397 | { |
| 407 | int l; | 398 | int l; |
| 408 | if (headerfile) | 399 | if (headerfile) |
| 409 | fprintf(out, "#define CONFIG_%s \"", name); | 400 | fprintf(out, "#define %s%s \"", CONFIG_, name); |
| 410 | else | 401 | else |
| 411 | fprintf(out, "CONFIG_%s=\"", name); | 402 | fprintf(out, "%s%s=\"", CONFIG_, name); |
| 412 | 403 | ||
| 413 | while (1) { | 404 | while (1) { |
| 414 | l = strcspn(str, "\"\\"); | 405 | l = strcspn(str, "\"\\"); |
| @@ -434,13 +425,14 @@ static void conf_write_symbol(struct symbol *sym, enum symbol_type type, | |||
| 434 | switch (sym_get_tristate_value(sym)) { | 425 | switch (sym_get_tristate_value(sym)) { |
| 435 | case no: | 426 | case no: |
| 436 | if (write_no) | 427 | if (write_no) |
| 437 | fprintf(out, "# CONFIG_%s is not set\n", sym->name); | 428 | fprintf(out, "# %s%s is not set\n", |
| 429 | CONFIG_, sym->name); | ||
| 438 | break; | 430 | break; |
| 439 | case mod: | 431 | case mod: |
| 440 | fprintf(out, "CONFIG_%s=m\n", sym->name); | 432 | fprintf(out, "%s%s=m\n", CONFIG_, sym->name); |
| 441 | break; | 433 | break; |
| 442 | case yes: | 434 | case yes: |
| 443 | fprintf(out, "CONFIG_%s=y\n", sym->name); | 435 | fprintf(out, "%s%s=y\n", CONFIG_, sym->name); |
| 444 | break; | 436 | break; |
| 445 | } | 437 | } |
| 446 | break; | 438 | break; |
| @@ -450,7 +442,7 @@ static void conf_write_symbol(struct symbol *sym, enum symbol_type type, | |||
| 450 | case S_HEX: | 442 | case S_HEX: |
| 451 | case S_INT: | 443 | case S_INT: |
| 452 | str = sym_get_string_value(sym); | 444 | str = sym_get_string_value(sym); |
| 453 | fprintf(out, "CONFIG_%s=%s\n", sym->name, str); | 445 | fprintf(out, "%s%s=%s\n", CONFIG_, sym->name, str); |
| 454 | break; | 446 | break; |
| 455 | case S_OTHER: | 447 | case S_OTHER: |
| 456 | case S_UNKNOWN: | 448 | case S_UNKNOWN: |
| @@ -582,8 +574,6 @@ int conf_write(const char *name) | |||
| 582 | if (!out) | 574 | if (!out) |
| 583 | return 1; | 575 | return 1; |
| 584 | 576 | ||
| 585 | sym = sym_lookup("KERNELVERSION", 0); | ||
| 586 | sym_calc_value(sym); | ||
| 587 | time(&now); | 577 | time(&now); |
| 588 | env = getenv("KCONFIG_NOTIMESTAMP"); | 578 | env = getenv("KCONFIG_NOTIMESTAMP"); |
| 589 | if (env && *env) | 579 | if (env && *env) |
| @@ -591,10 +581,10 @@ int conf_write(const char *name) | |||
| 591 | 581 | ||
| 592 | fprintf(out, _("#\n" | 582 | fprintf(out, _("#\n" |
| 593 | "# Automatically generated make config: don't edit\n" | 583 | "# Automatically generated make config: don't edit\n" |
| 594 | "# Linux kernel version: %s\n" | 584 | "# %s\n" |
| 595 | "%s%s" | 585 | "%s%s" |
| 596 | "#\n"), | 586 | "#\n"), |
| 597 | sym_get_string_value(sym), | 587 | rootmenu.prompt->text, |
| 598 | use_timestamp ? "# " : "", | 588 | use_timestamp ? "# " : "", |
| 599 | use_timestamp ? ctime(&now) : ""); | 589 | use_timestamp ? ctime(&now) : ""); |
| 600 | 590 | ||
| @@ -805,25 +795,23 @@ int conf_write_autoconf(void) | |||
| 805 | return 1; | 795 | return 1; |
| 806 | } | 796 | } |
| 807 | 797 | ||
| 808 | sym = sym_lookup("KERNELVERSION", 0); | ||
| 809 | sym_calc_value(sym); | ||
| 810 | time(&now); | 798 | time(&now); |
| 811 | fprintf(out, "#\n" | 799 | fprintf(out, "#\n" |
| 812 | "# Automatically generated make config: don't edit\n" | 800 | "# Automatically generated make config: don't edit\n" |
| 813 | "# Linux kernel version: %s\n" | 801 | "# %s\n" |
| 814 | "# %s" | 802 | "# %s" |
| 815 | "#\n", | 803 | "#\n", |
| 816 | sym_get_string_value(sym), ctime(&now)); | 804 | rootmenu.prompt->text, ctime(&now)); |
| 817 | fprintf(tristate, "#\n" | 805 | fprintf(tristate, "#\n" |
| 818 | "# Automatically generated - do not edit\n" | 806 | "# Automatically generated - do not edit\n" |
| 819 | "\n"); | 807 | "\n"); |
| 820 | fprintf(out_h, "/*\n" | 808 | fprintf(out_h, "/*\n" |
| 821 | " * Automatically generated C config: don't edit\n" | 809 | " * Automatically generated C config: don't edit\n" |
| 822 | " * Linux kernel version: %s\n" | 810 | " * %s\n" |
| 823 | " * %s" | 811 | " * %s" |
| 824 | " */\n" | 812 | " */\n" |
| 825 | "#define AUTOCONF_INCLUDED\n", | 813 | "#define AUTOCONF_INCLUDED\n", |
| 826 | sym_get_string_value(sym), ctime(&now)); | 814 | rootmenu.prompt->text, ctime(&now)); |
| 827 | 815 | ||
| 828 | for_all_symbols(i, sym) { | 816 | for_all_symbols(i, sym) { |
| 829 | sym_calc_value(sym); | 817 | sym_calc_value(sym); |
| @@ -841,14 +829,17 @@ int conf_write_autoconf(void) | |||
| 841 | case no: | 829 | case no: |
| 842 | break; | 830 | break; |
| 843 | case mod: | 831 | case mod: |
| 844 | fprintf(tristate, "CONFIG_%s=M\n", sym->name); | 832 | fprintf(tristate, "%s%s=M\n", |
| 845 | fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name); | 833 | CONFIG_, sym->name); |
| 834 | fprintf(out_h, "#define %s%s_MODULE 1\n", | ||
| 835 | CONFIG_, sym->name); | ||
| 846 | break; | 836 | break; |
| 847 | case yes: | 837 | case yes: |
| 848 | if (sym->type == S_TRISTATE) | 838 | if (sym->type == S_TRISTATE) |
| 849 | fprintf(tristate, "CONFIG_%s=Y\n", | 839 | fprintf(tristate,"%s%s=Y\n", |
| 850 | sym->name); | 840 | CONFIG_, sym->name); |
| 851 | fprintf(out_h, "#define CONFIG_%s 1\n", sym->name); | 841 | fprintf(out_h, "#define %s%s 1\n", |
| 842 | CONFIG_, sym->name); | ||
| 852 | break; | 843 | break; |
| 853 | } | 844 | } |
| 854 | break; | 845 | break; |
| @@ -858,12 +849,14 @@ int conf_write_autoconf(void) | |||
| 858 | case S_HEX: | 849 | case S_HEX: |
| 859 | str = sym_get_string_value(sym); | 850 | str = sym_get_string_value(sym); |
| 860 | if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { | 851 | if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { |
| 861 | fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str); | 852 | fprintf(out_h, "#define %s%s 0x%s\n", |
| 853 | CONFIG_, sym->name, str); | ||
| 862 | break; | 854 | break; |
| 863 | } | 855 | } |
| 864 | case S_INT: | 856 | case S_INT: |
| 865 | str = sym_get_string_value(sym); | 857 | str = sym_get_string_value(sym); |
| 866 | fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str); | 858 | fprintf(out_h, "#define %s%s %s\n", |
| 859 | CONFIG_, sym->name, str); | ||
| 867 | break; | 860 | break; |
| 868 | default: | 861 | default: |
| 869 | break; | 862 | break; |
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 6ee2e4fb1481..648c609caba0 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h | |||
| @@ -18,7 +18,7 @@ extern "C" { | |||
| 18 | struct file { | 18 | struct file { |
| 19 | struct file *next; | 19 | struct file *next; |
| 20 | struct file *parent; | 20 | struct file *parent; |
| 21 | char *name; | 21 | const char *name; |
| 22 | int lineno; | 22 | int lineno; |
| 23 | int flags; | 23 | int flags; |
| 24 | }; | 24 | }; |
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index d66988265f89..455896164d72 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c | |||
| @@ -133,7 +133,6 @@ void init_main_window(const gchar * glade_file) | |||
| 133 | GladeXML *xml; | 133 | GladeXML *xml; |
| 134 | GtkWidget *widget; | 134 | GtkWidget *widget; |
| 135 | GtkTextBuffer *txtbuf; | 135 | GtkTextBuffer *txtbuf; |
| 136 | char title[256]; | ||
| 137 | GtkStyle *style; | 136 | GtkStyle *style; |
| 138 | 137 | ||
| 139 | xml = glade_xml_new(glade_file, "window1", NULL); | 138 | xml = glade_xml_new(glade_file, "window1", NULL); |
| @@ -210,9 +209,7 @@ void init_main_window(const gchar * glade_file) | |||
| 210 | /*"style", PANGO_STYLE_OBLIQUE, */ | 209 | /*"style", PANGO_STYLE_OBLIQUE, */ |
| 211 | NULL); | 210 | NULL); |
| 212 | 211 | ||
| 213 | sprintf(title, _("Linux Kernel v%s Configuration"), | 212 | gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text); |
| 214 | getenv("KERNELVERSION")); | ||
| 215 | gtk_window_set_title(GTK_WINDOW(main_wnd), title); | ||
| 216 | 213 | ||
| 217 | gtk_widget_show(main_wnd); | 214 | gtk_widget_show(main_wnd); |
| 218 | } | 215 | } |
| @@ -671,8 +668,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) | |||
| 671 | { | 668 | { |
| 672 | GtkWidget *dialog; | 669 | GtkWidget *dialog; |
| 673 | const gchar *intro_text = _( | 670 | const gchar *intro_text = _( |
| 674 | "Welcome to gkc, the GTK+ graphical kernel configuration tool\n" | 671 | "Welcome to gkc, the GTK+ graphical configuration tool\n" |
| 675 | "for Linux.\n" | ||
| 676 | "For each option, a blank box indicates the feature is disabled, a\n" | 672 | "For each option, a blank box indicates the feature is disabled, a\n" |
| 677 | "check indicates it is enabled, and a dot indicates that it is to\n" | 673 | "check indicates it is enabled, and a dot indicates that it is to\n" |
| 678 | "be compiled as a module. Clicking on the box will cycle through the three states.\n" | 674 | "be compiled as a module. Clicking on the box will cycle through the three states.\n" |
| @@ -1531,12 +1527,6 @@ int main(int ac, char *av[]) | |||
| 1531 | else | 1527 | else |
| 1532 | glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL); | 1528 | glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL); |
| 1533 | 1529 | ||
| 1534 | /* Load the interface and connect signals */ | ||
| 1535 | init_main_window(glade_file); | ||
| 1536 | init_tree_model(); | ||
| 1537 | init_left_tree(); | ||
| 1538 | init_right_tree(); | ||
| 1539 | |||
| 1540 | /* Conf stuffs */ | 1530 | /* Conf stuffs */ |
| 1541 | if (ac > 1 && av[1][0] == '-') { | 1531 | if (ac > 1 && av[1][0] == '-') { |
| 1542 | switch (av[1][1]) { | 1532 | switch (av[1][1]) { |
| @@ -1556,6 +1546,12 @@ int main(int ac, char *av[]) | |||
| 1556 | fixup_rootmenu(&rootmenu); | 1546 | fixup_rootmenu(&rootmenu); |
| 1557 | conf_read(NULL); | 1547 | conf_read(NULL); |
| 1558 | 1548 | ||
| 1549 | /* Load the interface and connect signals */ | ||
| 1550 | init_main_window(glade_file); | ||
| 1551 | init_tree_model(); | ||
| 1552 | init_left_tree(); | ||
| 1553 | init_right_tree(); | ||
| 1554 | |||
| 1559 | switch (view_mode) { | 1555 | switch (view_mode) { |
| 1560 | case SINGLE_VIEW: | 1556 | case SINGLE_VIEW: |
| 1561 | display_tree_part(); | 1557 | display_tree_part(); |
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index fdc7113b08d1..6eb039718259 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped | |||
| @@ -2373,9 +2373,10 @@ void zconf_nextfile(const char *name) | |||
| 2373 | memset(buf, 0, sizeof(*buf)); | 2373 | memset(buf, 0, sizeof(*buf)); |
| 2374 | 2374 | ||
| 2375 | current_buf->state = YY_CURRENT_BUFFER; | 2375 | current_buf->state = YY_CURRENT_BUFFER; |
| 2376 | zconfin = zconf_fopen(name); | 2376 | zconfin = zconf_fopen(file->name); |
| 2377 | if (!zconfin) { | 2377 | if (!zconfin) { |
| 2378 | printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name); | 2378 | printf("%s:%d: can't open file \"%s\"\n", |
| 2379 | zconf_curname(), zconf_lineno(), file->name); | ||
| 2379 | exit(1); | 2380 | exit(1); |
| 2380 | } | 2381 | } |
| 2381 | zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); | 2382 | zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); |
| @@ -2422,7 +2423,7 @@ int zconf_lineno(void) | |||
| 2422 | return current_pos.lineno; | 2423 | return current_pos.lineno; |
| 2423 | } | 2424 | } |
| 2424 | 2425 | ||
| 2425 | char *zconf_curname(void) | 2426 | const char *zconf_curname(void) |
| 2426 | { | 2427 | { |
| 2427 | return current_pos.file ? current_pos.file->name : "<none>"; | 2428 | return current_pos.file ? current_pos.file->name : "<none>"; |
| 2428 | } | 2429 | } |
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index bdf71bd31412..753cdbd7b805 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h | |||
| @@ -31,12 +31,18 @@ extern "C" { | |||
| 31 | 31 | ||
| 32 | #define SRCTREE "srctree" | 32 | #define SRCTREE "srctree" |
| 33 | 33 | ||
| 34 | #ifndef PACKAGE | ||
| 34 | #define PACKAGE "linux" | 35 | #define PACKAGE "linux" |
| 36 | #endif | ||
| 37 | |||
| 35 | #define LOCALEDIR "/usr/share/locale" | 38 | #define LOCALEDIR "/usr/share/locale" |
| 36 | 39 | ||
| 37 | #define _(text) gettext(text) | 40 | #define _(text) gettext(text) |
| 38 | #define N_(text) (text) | 41 | #define N_(text) (text) |
| 39 | 42 | ||
| 43 | #ifndef CONFIG_ | ||
| 44 | #define CONFIG_ "CONFIG_" | ||
| 45 | #endif | ||
| 40 | 46 | ||
| 41 | #define TF_COMMAND 0x0001 | 47 | #define TF_COMMAND 0x0001 |
| 42 | #define TF_PARAM 0x0002 | 48 | #define TF_PARAM 0x0002 |
| @@ -70,7 +76,7 @@ FILE *zconf_fopen(const char *name); | |||
| 70 | void zconf_initscan(const char *name); | 76 | void zconf_initscan(const char *name); |
| 71 | void zconf_nextfile(const char *name); | 77 | void zconf_nextfile(const char *name); |
| 72 | int zconf_lineno(void); | 78 | int zconf_lineno(void); |
| 73 | char *zconf_curname(void); | 79 | const char *zconf_curname(void); |
| 74 | 80 | ||
| 75 | /* conf.c */ | 81 | /* conf.c */ |
| 76 | void xfgets(char *str, int size, FILE *in); | 82 | void xfgets(char *str, int size, FILE *in); |
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h index 9a948c9ce44e..4531badb3fe1 100644 --- a/scripts/kconfig/lkc_proto.h +++ b/scripts/kconfig/lkc_proto.h | |||
| @@ -28,6 +28,7 @@ P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); | |||
| 28 | 28 | ||
| 29 | P(sym_lookup,struct symbol *,(const char *name, int flags)); | 29 | P(sym_lookup,struct symbol *,(const char *name, int flags)); |
| 30 | P(sym_find,struct symbol *,(const char *name)); | 30 | P(sym_find,struct symbol *,(const char *name)); |
| 31 | P(sym_expand_string_value,const char *,(const char *in)); | ||
| 31 | P(sym_re_search,struct symbol **,(const char *pattern)); | 32 | P(sym_re_search,struct symbol **,(const char *pattern)); |
| 32 | P(sym_type_name,const char *,(enum symbol_type type)); | 33 | P(sym_type_name,const char *,(enum symbol_type type)); |
| 33 | P(sym_calc_value,void,(struct symbol *sym)); | 34 | P(sym_calc_value,void,(struct symbol *sym)); |
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index d2f6e056c058..d433c7a24745 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
| @@ -25,11 +25,9 @@ | |||
| 25 | static const char mconf_readme[] = N_( | 25 | static const char mconf_readme[] = N_( |
| 26 | "Overview\n" | 26 | "Overview\n" |
| 27 | "--------\n" | 27 | "--------\n" |
| 28 | "Some kernel features may be built directly into the kernel.\n" | 28 | "This interface let you select features and parameters for the build.\n" |
| 29 | "Some may be made into loadable runtime modules. Some features\n" | 29 | "Features can either be built-in, modularized, or ignored. Parameters\n" |
| 30 | "may be completely removed altogether. There are also certain\n" | 30 | "must be entered in as decimal or hexadecimal numbers or text.\n" |
| 31 | "kernel parameters which are not really features, but must be\n" | ||
| 32 | "entered in as decimal or hexadecimal numbers or possibly text.\n" | ||
| 33 | "\n" | 31 | "\n" |
| 34 | "Menu items beginning with following braces represent features that\n" | 32 | "Menu items beginning with following braces represent features that\n" |
| 35 | " [ ] can be built in or removed\n" | 33 | " [ ] can be built in or removed\n" |
| @@ -117,7 +115,7 @@ static const char mconf_readme[] = N_( | |||
| 117 | "-----------------------------\n" | 115 | "-----------------------------\n" |
| 118 | "Menuconfig supports the use of alternate configuration files for\n" | 116 | "Menuconfig supports the use of alternate configuration files for\n" |
| 119 | "those who, for various reasons, find it necessary to switch\n" | 117 | "those who, for various reasons, find it necessary to switch\n" |
| 120 | "between different kernel configurations.\n" | 118 | "between different configurations.\n" |
| 121 | "\n" | 119 | "\n" |
| 122 | "At the end of the main menu you will find two options. One is\n" | 120 | "At the end of the main menu you will find two options. One is\n" |
| 123 | "for saving the current configuration to a file of your choosing.\n" | 121 | "for saving the current configuration to a file of your choosing.\n" |
| @@ -150,9 +148,9 @@ static const char mconf_readme[] = N_( | |||
| 150 | "\n" | 148 | "\n" |
| 151 | "Optional personality available\n" | 149 | "Optional personality available\n" |
| 152 | "------------------------------\n" | 150 | "------------------------------\n" |
| 153 | "If you prefer to have all of the kernel options listed in a single\n" | 151 | "If you prefer to have all of the options listed in a single menu, rather\n" |
| 154 | "menu, rather than the default multimenu hierarchy, run the menuconfig\n" | 152 | "than the default multimenu hierarchy, run the menuconfig with\n" |
| 155 | "with MENUCONFIG_MODE environment variable set to single_menu. Example:\n" | 153 | "MENUCONFIG_MODE environment variable set to single_menu. Example:\n" |
| 156 | "\n" | 154 | "\n" |
| 157 | "make MENUCONFIG_MODE=single_menu menuconfig\n" | 155 | "make MENUCONFIG_MODE=single_menu menuconfig\n" |
| 158 | "\n" | 156 | "\n" |
| @@ -207,12 +205,12 @@ load_config_text[] = N_( | |||
| 207 | "last retrieved. Leave blank to abort."), | 205 | "last retrieved. Leave blank to abort."), |
| 208 | load_config_help[] = N_( | 206 | load_config_help[] = N_( |
| 209 | "\n" | 207 | "\n" |
| 210 | "For various reasons, one may wish to keep several different kernel\n" | 208 | "For various reasons, one may wish to keep several different\n" |
| 211 | "configurations available on a single machine.\n" | 209 | "configurations available on a single machine.\n" |
| 212 | "\n" | 210 | "\n" |
| 213 | "If you have saved a previous configuration in a file other than the\n" | 211 | "If you have saved a previous configuration in a file other than the\n" |
| 214 | "kernel's default, entering the name of the file here will allow you\n" | 212 | "default one, entering its name here will allow you to modify that\n" |
| 215 | "to modify that configuration.\n" | 213 | "configuration.\n" |
| 216 | "\n" | 214 | "\n" |
| 217 | "If you are uncertain, then you have probably never used alternate\n" | 215 | "If you are uncertain, then you have probably never used alternate\n" |
| 218 | "configuration files. You should therefore leave this blank to abort.\n"), | 216 | "configuration files. You should therefore leave this blank to abort.\n"), |
| @@ -221,8 +219,8 @@ save_config_text[] = N_( | |||
| 221 | "as an alternate. Leave blank to abort."), | 219 | "as an alternate. Leave blank to abort."), |
| 222 | save_config_help[] = N_( | 220 | save_config_help[] = N_( |
| 223 | "\n" | 221 | "\n" |
| 224 | "For various reasons, one may wish to keep different kernel\n" | 222 | "For various reasons, one may wish to keep different configurations\n" |
| 225 | "configurations available on a single machine.\n" | 223 | "available on a single machine.\n" |
| 226 | "\n" | 224 | "\n" |
| 227 | "Entering a file name here will allow you to later retrieve, modify\n" | 225 | "Entering a file name here will allow you to later retrieve, modify\n" |
| 228 | "and use the current configuration as an alternate to whatever\n" | 226 | "and use the current configuration as an alternate to whatever\n" |
| @@ -232,7 +230,7 @@ save_config_help[] = N_( | |||
| 232 | "leave this blank.\n"), | 230 | "leave this blank.\n"), |
| 233 | search_help[] = N_( | 231 | search_help[] = N_( |
| 234 | "\n" | 232 | "\n" |
| 235 | "Search for CONFIG_ symbols and display their relations.\n" | 233 | "Search for symbols and display their relations.\n" |
| 236 | "Regular expressions are allowed.\n" | 234 | "Regular expressions are allowed.\n" |
| 237 | "Example: search for \"^FOO\"\n" | 235 | "Example: search for \"^FOO\"\n" |
| 238 | "Result:\n" | 236 | "Result:\n" |
| @@ -249,7 +247,7 @@ search_help[] = N_( | |||
| 249 | "Selected by: BAR\n" | 247 | "Selected by: BAR\n" |
| 250 | "-----------------------------------------------------------------\n" | 248 | "-----------------------------------------------------------------\n" |
| 251 | "o The line 'Prompt:' shows the text used in the menu structure for\n" | 249 | "o The line 'Prompt:' shows the text used in the menu structure for\n" |
| 252 | " this CONFIG_ symbol\n" | 250 | " this symbol\n" |
| 253 | "o The 'Defined at' line tell at what file / line number the symbol\n" | 251 | "o The 'Defined at' line tell at what file / line number the symbol\n" |
| 254 | " is defined\n" | 252 | " is defined\n" |
| 255 | "o The 'Depends on:' line tell what symbols needs to be defined for\n" | 253 | "o The 'Depends on:' line tell what symbols needs to be defined for\n" |
| @@ -265,9 +263,9 @@ search_help[] = N_( | |||
| 265 | "Only relevant lines are shown.\n" | 263 | "Only relevant lines are shown.\n" |
| 266 | "\n\n" | 264 | "\n\n" |
| 267 | "Search examples:\n" | 265 | "Search examples:\n" |
| 268 | "Examples: USB => find all CONFIG_ symbols containing USB\n" | 266 | "Examples: USB => find all symbols containing USB\n" |
| 269 | " ^USB => find all CONFIG_ symbols starting with USB\n" | 267 | " ^USB => find all symbols starting with USB\n" |
| 270 | " USB$ => find all CONFIG_ symbols ending with USB\n" | 268 | " USB$ => find all symbols ending with USB\n" |
| 271 | "\n"); | 269 | "\n"); |
| 272 | 270 | ||
| 273 | static int indent; | 271 | static int indent; |
| @@ -290,13 +288,9 @@ static void set_config_filename(const char *config_filename) | |||
| 290 | { | 288 | { |
| 291 | static char menu_backtitle[PATH_MAX+128]; | 289 | static char menu_backtitle[PATH_MAX+128]; |
| 292 | int size; | 290 | int size; |
| 293 | struct symbol *sym; | ||
| 294 | 291 | ||
| 295 | sym = sym_lookup("KERNELVERSION", 0); | ||
| 296 | sym_calc_value(sym); | ||
| 297 | size = snprintf(menu_backtitle, sizeof(menu_backtitle), | 292 | size = snprintf(menu_backtitle, sizeof(menu_backtitle), |
| 298 | _("%s - Linux Kernel v%s Configuration"), | 293 | "%s - %s", config_filename, rootmenu.prompt->text); |
| 299 | config_filename, sym_get_string_value(sym)); | ||
| 300 | if (size >= sizeof(menu_backtitle)) | 294 | if (size >= sizeof(menu_backtitle)) |
| 301 | menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; | 295 | menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; |
| 302 | set_dialog_backtitle(menu_backtitle); | 296 | set_dialog_backtitle(menu_backtitle); |
| @@ -316,8 +310,8 @@ static void search_conf(void) | |||
| 316 | again: | 310 | again: |
| 317 | dialog_clear(); | 311 | dialog_clear(); |
| 318 | dres = dialog_inputbox(_("Search Configuration Parameter"), | 312 | dres = dialog_inputbox(_("Search Configuration Parameter"), |
| 319 | _("Enter CONFIG_ (sub)string to search for " | 313 | _("Enter " CONFIG_ " (sub)string to search for " |
| 320 | "(with or without \"CONFIG\")"), | 314 | "(with or without \"" CONFIG_ "\")"), |
| 321 | 10, 75, ""); | 315 | 10, 75, ""); |
| 322 | switch (dres) { | 316 | switch (dres) { |
| 323 | case 0: | 317 | case 0: |
| @@ -329,10 +323,10 @@ again: | |||
| 329 | return; | 323 | return; |
| 330 | } | 324 | } |
| 331 | 325 | ||
| 332 | /* strip CONFIG_ if necessary */ | 326 | /* strip the prefix if necessary */ |
| 333 | dialog_input = dialog_input_result; | 327 | dialog_input = dialog_input_result; |
| 334 | if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0) | 328 | if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) |
| 335 | dialog_input += 7; | 329 | dialog_input += strlen(CONFIG_); |
| 336 | 330 | ||
| 337 | sym_arr = sym_re_search(dialog_input); | 331 | sym_arr = sym_re_search(dialog_input); |
| 338 | res = get_relations_str(sym_arr); | 332 | res = get_relations_str(sym_arr); |
| @@ -834,7 +828,7 @@ int main(int ac, char **av) | |||
| 834 | if (conf_get_changed()) | 828 | if (conf_get_changed()) |
| 835 | res = dialog_yesno(NULL, | 829 | res = dialog_yesno(NULL, |
| 836 | _("Do you wish to save your " | 830 | _("Do you wish to save your " |
| 837 | "new kernel configuration?\n" | 831 | "new configuration?\n" |
| 838 | "<ESC><ESC> to continue."), | 832 | "<ESC><ESC> to continue."), |
| 839 | 6, 60); | 833 | 6, 60); |
| 840 | else | 834 | else |
| @@ -846,20 +840,20 @@ int main(int ac, char **av) | |||
| 846 | case 0: | 840 | case 0: |
| 847 | if (conf_write(filename)) { | 841 | if (conf_write(filename)) { |
| 848 | fprintf(stderr, _("\n\n" | 842 | fprintf(stderr, _("\n\n" |
| 849 | "Error during writing of the kernel configuration.\n" | 843 | "Error while writing of the configuration.\n" |
| 850 | "Your kernel configuration changes were NOT saved." | 844 | "Your configuration changes were NOT saved." |
| 851 | "\n\n")); | 845 | "\n\n")); |
| 852 | return 1; | 846 | return 1; |
| 853 | } | 847 | } |
| 854 | case -1: | 848 | case -1: |
| 855 | printf(_("\n\n" | 849 | printf(_("\n\n" |
| 856 | "*** End of Linux kernel configuration.\n" | 850 | "*** End of the configuration.\n" |
| 857 | "*** Execute 'make' to build the kernel or try 'make help'." | 851 | "*** Execute 'make' to start the build or try 'make help'." |
| 858 | "\n\n")); | 852 | "\n\n")); |
| 859 | break; | 853 | break; |
| 860 | default: | 854 | default: |
| 861 | fprintf(stderr, _("\n\n" | 855 | fprintf(stderr, _("\n\n" |
| 862 | "Your kernel configuration changes were NOT saved." | 856 | "Your configuration changes were NOT saved." |
| 863 | "\n\n")); | 857 | "\n\n")); |
| 864 | } | 858 | } |
| 865 | 859 | ||
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 4fb590247f33..23acbdb2fd50 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | #include "lkc.h" | 10 | #include "lkc.h" |
| 11 | 11 | ||
| 12 | static const char nohelp_text[] = N_( | 12 | static const char nohelp_text[] = N_( |
| 13 | "There is no help available for this kernel option.\n"); | 13 | "There is no help available for this option.\n"); |
| 14 | 14 | ||
| 15 | struct menu rootmenu; | 15 | struct menu rootmenu; |
| 16 | static struct menu **last_entry_ptr; | 16 | static struct menu **last_entry_ptr; |
| @@ -139,7 +139,7 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e | |||
| 139 | while (isspace(*prompt)) | 139 | while (isspace(*prompt)) |
| 140 | prompt++; | 140 | prompt++; |
| 141 | } | 141 | } |
| 142 | if (current_entry->prompt) | 142 | if (current_entry->prompt && current_entry != &rootmenu) |
| 143 | prop_warn(prop, "prompt redefined"); | 143 | prop_warn(prop, "prompt redefined"); |
| 144 | current_entry->prompt = prop; | 144 | current_entry->prompt = prop; |
| 145 | } | 145 | } |
| @@ -566,7 +566,7 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help) | |||
| 566 | 566 | ||
| 567 | if (menu_has_help(menu)) { | 567 | if (menu_has_help(menu)) { |
| 568 | if (sym->name) { | 568 | if (sym->name) { |
| 569 | str_printf(help, "CONFIG_%s:\n\n", sym->name); | 569 | str_printf(help, "%s%s:\n\n", CONFIG_, sym->name); |
| 570 | str_append(help, _(menu_get_help(menu))); | 570 | str_append(help, _(menu_get_help(menu))); |
| 571 | str_append(help, "\n"); | 571 | str_append(help, "\n"); |
| 572 | } | 572 | } |
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index d4d1fa696c93..a2969fdc66b4 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c | |||
| @@ -15,11 +15,9 @@ | |||
| 15 | static const char nconf_readme[] = N_( | 15 | static const char nconf_readme[] = N_( |
| 16 | "Overview\n" | 16 | "Overview\n" |
| 17 | "--------\n" | 17 | "--------\n" |
| 18 | "Some kernel features may be built directly into the kernel.\n" | 18 | "This interface let you select features and parameters for the build.\n" |
| 19 | "Some may be made into loadable runtime modules. Some features\n" | 19 | "Features can either be built-in, modularized, or ignored. Parameters\n" |
| 20 | "may be completely removed altogether. There are also certain\n" | 20 | "must be entered in as decimal or hexadecimal numbers or text.\n" |
| 21 | "kernel parameters which are not really features, but must be\n" | ||
| 22 | "entered in as decimal or hexadecimal numbers or possibly text.\n" | ||
| 23 | "\n" | 21 | "\n" |
| 24 | "Menu items beginning with following braces represent features that\n" | 22 | "Menu items beginning with following braces represent features that\n" |
| 25 | " [ ] can be built in or removed\n" | 23 | " [ ] can be built in or removed\n" |
| @@ -95,7 +93,7 @@ static const char nconf_readme[] = N_( | |||
| 95 | "-----------------------------\n" | 93 | "-----------------------------\n" |
| 96 | "nconfig supports the use of alternate configuration files for\n" | 94 | "nconfig supports the use of alternate configuration files for\n" |
| 97 | "those who, for various reasons, find it necessary to switch\n" | 95 | "those who, for various reasons, find it necessary to switch\n" |
| 98 | "between different kernel configurations.\n" | 96 | "between different configurations.\n" |
| 99 | "\n" | 97 | "\n" |
| 100 | "At the end of the main menu you will find two options. One is\n" | 98 | "At the end of the main menu you will find two options. One is\n" |
| 101 | "for saving the current configuration to a file of your choosing.\n" | 99 | "for saving the current configuration to a file of your choosing.\n" |
| @@ -128,9 +126,9 @@ static const char nconf_readme[] = N_( | |||
| 128 | "\n" | 126 | "\n" |
| 129 | "Optional personality available\n" | 127 | "Optional personality available\n" |
| 130 | "------------------------------\n" | 128 | "------------------------------\n" |
| 131 | "If you prefer to have all of the kernel options listed in a single\n" | 129 | "If you prefer to have all of the options listed in a single menu, rather\n" |
| 132 | "menu, rather than the default multimenu hierarchy, run the nconfig\n" | 130 | "than the default multimenu hierarchy, run the nconfig with NCONFIG_MODE\n" |
| 133 | "with NCONFIG_MODE environment variable set to single_menu. Example:\n" | 131 | "environment variable set to single_menu. Example:\n" |
| 134 | "\n" | 132 | "\n" |
| 135 | "make NCONFIG_MODE=single_menu nconfig\n" | 133 | "make NCONFIG_MODE=single_menu nconfig\n" |
| 136 | "\n" | 134 | "\n" |
| @@ -185,19 +183,19 @@ setmod_text[] = N_( | |||
| 185 | "has been configured as a module.\n" | 183 | "has been configured as a module.\n" |
| 186 | "As a result, this feature will be built as a module."), | 184 | "As a result, this feature will be built as a module."), |
| 187 | nohelp_text[] = N_( | 185 | nohelp_text[] = N_( |
| 188 | "There is no help available for this kernel option.\n"), | 186 | "There is no help available for this option.\n"), |
| 189 | load_config_text[] = N_( | 187 | load_config_text[] = N_( |
| 190 | "Enter the name of the configuration file you wish to load.\n" | 188 | "Enter the name of the configuration file you wish to load.\n" |
| 191 | "Accept the name shown to restore the configuration you\n" | 189 | "Accept the name shown to restore the configuration you\n" |
| 192 | "last retrieved. Leave blank to abort."), | 190 | "last retrieved. Leave blank to abort."), |
| 193 | load_config_help[] = N_( | 191 | load_config_help[] = N_( |
| 194 | "\n" | 192 | "\n" |
| 195 | "For various reasons, one may wish to keep several different kernel\n" | 193 | "For various reasons, one may wish to keep several different\n" |
| 196 | "configurations available on a single machine.\n" | 194 | "configurations available on a single machine.\n" |
| 197 | "\n" | 195 | "\n" |
| 198 | "If you have saved a previous configuration in a file other than the\n" | 196 | "If you have saved a previous configuration in a file other than the\n" |
| 199 | "kernel's default, entering the name of the file here will allow you\n" | 197 | "default one, entering its name here will allow you to modify that\n" |
| 200 | "to modify that configuration.\n" | 198 | "configuration.\n" |
| 201 | "\n" | 199 | "\n" |
| 202 | "If you are uncertain, then you have probably never used alternate\n" | 200 | "If you are uncertain, then you have probably never used alternate\n" |
| 203 | "configuration files. You should therefor leave this blank to abort.\n"), | 201 | "configuration files. You should therefor leave this blank to abort.\n"), |
| @@ -206,8 +204,8 @@ save_config_text[] = N_( | |||
| 206 | "as an alternate. Leave blank to abort."), | 204 | "as an alternate. Leave blank to abort."), |
| 207 | save_config_help[] = N_( | 205 | save_config_help[] = N_( |
| 208 | "\n" | 206 | "\n" |
| 209 | "For various reasons, one may wish to keep different kernel\n" | 207 | "For various reasons, one may wish to keep different configurations\n" |
| 210 | "configurations available on a single machine.\n" | 208 | "available on a single machine.\n" |
| 211 | "\n" | 209 | "\n" |
| 212 | "Entering a file name here will allow you to later retrieve, modify\n" | 210 | "Entering a file name here will allow you to later retrieve, modify\n" |
| 213 | "and use the current configuration as an alternate to whatever\n" | 211 | "and use the current configuration as an alternate to whatever\n" |
| @@ -217,8 +215,8 @@ save_config_help[] = N_( | |||
| 217 | "leave this blank.\n"), | 215 | "leave this blank.\n"), |
| 218 | search_help[] = N_( | 216 | search_help[] = N_( |
| 219 | "\n" | 217 | "\n" |
| 220 | "Search for CONFIG_ symbols and display their relations.\n" | 218 | "Search for symbols and display their relations. Regular expressions\n" |
| 221 | "Regular expressions are allowed.\n" | 219 | "are allowed.\n" |
| 222 | "Example: search for \"^FOO\"\n" | 220 | "Example: search for \"^FOO\"\n" |
| 223 | "Result:\n" | 221 | "Result:\n" |
| 224 | "-----------------------------------------------------------------\n" | 222 | "-----------------------------------------------------------------\n" |
| @@ -234,7 +232,7 @@ search_help[] = N_( | |||
| 234 | "Selected by: BAR\n" | 232 | "Selected by: BAR\n" |
| 235 | "-----------------------------------------------------------------\n" | 233 | "-----------------------------------------------------------------\n" |
| 236 | "o The line 'Prompt:' shows the text used in the menu structure for\n" | 234 | "o The line 'Prompt:' shows the text used in the menu structure for\n" |
| 237 | " this CONFIG_ symbol\n" | 235 | " this symbol\n" |
| 238 | "o The 'Defined at' line tell at what file / line number the symbol\n" | 236 | "o The 'Defined at' line tell at what file / line number the symbol\n" |
| 239 | " is defined\n" | 237 | " is defined\n" |
| 240 | "o The 'Depends on:' line tell what symbols needs to be defined for\n" | 238 | "o The 'Depends on:' line tell what symbols needs to be defined for\n" |
| @@ -250,9 +248,9 @@ search_help[] = N_( | |||
| 250 | "Only relevant lines are shown.\n" | 248 | "Only relevant lines are shown.\n" |
| 251 | "\n\n" | 249 | "\n\n" |
| 252 | "Search examples:\n" | 250 | "Search examples:\n" |
| 253 | "Examples: USB = > find all CONFIG_ symbols containing USB\n" | 251 | "Examples: USB = > find all symbols containing USB\n" |
| 254 | " ^USB => find all CONFIG_ symbols starting with USB\n" | 252 | " ^USB => find all symbols starting with USB\n" |
| 255 | " USB$ => find all CONFIG_ symbols ending with USB\n" | 253 | " USB$ => find all symbols ending with USB\n" |
| 256 | "\n"); | 254 | "\n"); |
| 257 | 255 | ||
| 258 | struct mitem { | 256 | struct mitem { |
| @@ -635,13 +633,9 @@ static char menu_backtitle[PATH_MAX+128]; | |||
| 635 | static const char *set_config_filename(const char *config_filename) | 633 | static const char *set_config_filename(const char *config_filename) |
| 636 | { | 634 | { |
| 637 | int size; | 635 | int size; |
| 638 | struct symbol *sym; | ||
| 639 | 636 | ||
| 640 | sym = sym_lookup("KERNELVERSION", 0); | ||
| 641 | sym_calc_value(sym); | ||
| 642 | size = snprintf(menu_backtitle, sizeof(menu_backtitle), | 637 | size = snprintf(menu_backtitle, sizeof(menu_backtitle), |
| 643 | _("%s - Linux Kernel v%s Configuration"), | 638 | "%s - %s", config_filename, rootmenu.prompt->text); |
| 644 | config_filename, sym_get_string_value(sym)); | ||
| 645 | if (size >= sizeof(menu_backtitle)) | 639 | if (size >= sizeof(menu_backtitle)) |
| 646 | menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; | 640 | menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; |
| 647 | 641 | ||
| @@ -681,8 +675,7 @@ static int do_exit(void) | |||
| 681 | return 0; | 675 | return 0; |
| 682 | } | 676 | } |
| 683 | res = btn_dialog(main_window, | 677 | res = btn_dialog(main_window, |
| 684 | _("Do you wish to save your " | 678 | _("Do you wish to save your new configuration?\n" |
| 685 | "new kernel configuration?\n" | ||
| 686 | "<ESC> to cancel and resume nconfig."), | 679 | "<ESC> to cancel and resume nconfig."), |
| 687 | 2, | 680 | 2, |
| 688 | " <save> ", | 681 | " <save> ", |
| @@ -701,18 +694,16 @@ static int do_exit(void) | |||
| 701 | if (res) | 694 | if (res) |
| 702 | btn_dialog( | 695 | btn_dialog( |
| 703 | main_window, | 696 | main_window, |
| 704 | _("Error during writing of the kernel " | 697 | _("Error during writing of configuration.\n" |
| 705 | "configuration.\n" | 698 | "Your configuration changes were NOT saved."), |
| 706 | "Your kernel configuration " | ||
| 707 | "changes were NOT saved."), | ||
| 708 | 1, | 699 | 1, |
| 709 | "<OK>"); | 700 | "<OK>"); |
| 710 | else { | 701 | else { |
| 711 | char buf[1024]; | 702 | char buf[1024]; |
| 712 | snprintf(buf, 1024, | 703 | snprintf(buf, 1024, |
| 713 | _("Configuration written to %s\n" | 704 | _("Configuration written to %s\n" |
| 714 | "End of Linux kernel configuration.\n" | 705 | "End of the configuration.\n" |
| 715 | "Execute 'make' to build the kernel or try" | 706 | "Execute 'make' to start the build or try" |
| 716 | " 'make help'."), filename); | 707 | " 'make help'."), filename); |
| 717 | btn_dialog( | 708 | btn_dialog( |
| 718 | main_window, | 709 | main_window, |
| @@ -724,7 +715,7 @@ static int do_exit(void) | |||
| 724 | default: | 715 | default: |
| 725 | btn_dialog( | 716 | btn_dialog( |
| 726 | main_window, | 717 | main_window, |
| 727 | _("Your kernel configuration changes were NOT saved."), | 718 | _("Your configuration changes were NOT saved."), |
| 728 | 1, | 719 | 1, |
| 729 | "<OK>"); | 720 | "<OK>"); |
| 730 | break; | 721 | break; |
| @@ -744,8 +735,8 @@ static void search_conf(void) | |||
| 744 | again: | 735 | again: |
| 745 | dres = dialog_inputbox(main_window, | 736 | dres = dialog_inputbox(main_window, |
| 746 | _("Search Configuration Parameter"), | 737 | _("Search Configuration Parameter"), |
| 747 | _("Enter CONFIG_ (sub)string to search for " | 738 | _("Enter " CONFIG_ " (sub)string to search for " |
| 748 | "(with or without \"CONFIG\")"), | 739 | "(with or without \"" CONFIG_ "\")"), |
| 749 | "", dialog_input_result, 99); | 740 | "", dialog_input_result, 99); |
| 750 | switch (dres) { | 741 | switch (dres) { |
| 751 | case 0: | 742 | case 0: |
| @@ -758,10 +749,10 @@ again: | |||
| 758 | return; | 749 | return; |
| 759 | } | 750 | } |
| 760 | 751 | ||
| 761 | /* strip CONFIG_ if necessary */ | 752 | /* strip the prefix if necessary */ |
| 762 | dialog_input = dialog_input_result; | 753 | dialog_input = dialog_input_result; |
| 763 | if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0) | 754 | if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) |
| 764 | dialog_input += 7; | 755 | dialog_input += strlen(CONFIG_); |
| 765 | 756 | ||
| 766 | sym_arr = sym_re_search(dialog_input); | 757 | sym_arr = sym_re_search(dialog_input); |
| 767 | res = get_relations_str(sym_arr); | 758 | res = get_relations_str(sym_arr); |
| @@ -1261,7 +1252,7 @@ static void show_help(struct menu *menu) | |||
| 1261 | 1252 | ||
| 1262 | if (menu && menu->sym && menu_has_help(menu)) { | 1253 | if (menu && menu->sym && menu_has_help(menu)) { |
| 1263 | if (menu->sym->name) { | 1254 | if (menu->sym->name) { |
| 1264 | str_printf(&help, "CONFIG_%s:\n\n", menu->sym->name); | 1255 | str_printf(&help, "%s%s:\n\n", CONFIG_, menu->sym->name); |
| 1265 | str_append(&help, _(menu_get_help(menu))); | 1256 | str_append(&help, _(menu_get_help(menu))); |
| 1266 | str_append(&help, "\n"); | 1257 | str_append(&help, "\n"); |
| 1267 | get_symbol_str(&help, menu->sym); | 1258 | get_symbol_str(&help, menu->sym); |
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index a04e4517ead1..06dd2e33581d 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc | |||
| @@ -1274,8 +1274,8 @@ ConfigMainWindow::ConfigMainWindow(void) | |||
| 1274 | char title[256]; | 1274 | char title[256]; |
| 1275 | 1275 | ||
| 1276 | QDesktopWidget *d = configApp->desktop(); | 1276 | QDesktopWidget *d = configApp->desktop(); |
| 1277 | snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration%s"), | 1277 | snprintf(title, sizeof(title), "%s%s", |
| 1278 | getenv("KERNELVERSION"), | 1278 | rootmenu.prompt->text, |
| 1279 | #if QT_VERSION < 0x040000 | 1279 | #if QT_VERSION < 0x040000 |
| 1280 | " (Qt3)" | 1280 | " (Qt3)" |
| 1281 | #else | 1281 | #else |
| @@ -1655,7 +1655,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) | |||
| 1655 | 1655 | ||
| 1656 | void ConfigMainWindow::showIntro(void) | 1656 | void ConfigMainWindow::showIntro(void) |
| 1657 | { | 1657 | { |
| 1658 | static const QString str = _("Welcome to the qconf graphical kernel configuration tool for Linux.\n\n" | 1658 | static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n" |
| 1659 | "For each option, a blank box indicates the feature is disabled, a check\n" | 1659 | "For each option, a blank box indicates the feature is disabled, a check\n" |
| 1660 | "indicates it is enabled, and a dot indicates that it is to be compiled\n" | 1660 | "indicates it is enabled, and a dot indicates that it is to be compiled\n" |
| 1661 | "as a module. Clicking on the box will cycle through the three states.\n\n" | 1661 | "as a module. Clicking on the box will cycle through the three states.\n\n" |
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 943712ca6c0a..dc5dcf2189a0 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c | |||
| @@ -840,6 +840,55 @@ struct symbol *sym_find(const char *name) | |||
| 840 | return symbol; | 840 | return symbol; |
| 841 | } | 841 | } |
| 842 | 842 | ||
| 843 | /* | ||
| 844 | * Expand symbol's names embedded in the string given in argument. Symbols' | ||
| 845 | * name to be expanded shall be prefixed by a '$'. Unknown symbol expands to | ||
| 846 | * the empty string. | ||
| 847 | */ | ||
| 848 | const char *sym_expand_string_value(const char *in) | ||
| 849 | { | ||
| 850 | const char *src; | ||
| 851 | char *res; | ||
| 852 | size_t reslen; | ||
| 853 | |||
| 854 | reslen = strlen(in) + 1; | ||
| 855 | res = malloc(reslen); | ||
| 856 | res[0] = '\0'; | ||
| 857 | |||
| 858 | while ((src = strchr(in, '$'))) { | ||
| 859 | char *p, name[SYMBOL_MAXLENGTH]; | ||
| 860 | const char *symval = ""; | ||
| 861 | struct symbol *sym; | ||
| 862 | size_t newlen; | ||
| 863 | |||
| 864 | strncat(res, in, src - in); | ||
| 865 | src++; | ||
| 866 | |||
| 867 | p = name; | ||
| 868 | while (isalnum(*src) || *src == '_') | ||
| 869 | *p++ = *src++; | ||
| 870 | *p = '\0'; | ||
| 871 | |||
| 872 | sym = sym_find(name); | ||
| 873 | if (sym != NULL) { | ||
| 874 | sym_calc_value(sym); | ||
| 875 | symval = sym_get_string_value(sym); | ||
| 876 | } | ||
| 877 | |||
| 878 | newlen = strlen(res) + strlen(symval) + strlen(src); | ||
| 879 | if (newlen > reslen) { | ||
| 880 | reslen = newlen; | ||
| 881 | realloc(res, reslen); | ||
| 882 | } | ||
| 883 | |||
| 884 | strcat(res, symval); | ||
| 885 | in = src; | ||
| 886 | } | ||
| 887 | strcat(res, in); | ||
| 888 | |||
| 889 | return res; | ||
| 890 | } | ||
| 891 | |||
| 843 | struct symbol **sym_re_search(const char *pattern) | 892 | struct symbol **sym_re_search(const char *pattern) |
| 844 | { | 893 | { |
| 845 | struct symbol *sym, **sym_arr = NULL; | 894 | struct symbol *sym, **sym_arr = NULL; |
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index 78b5c04e736b..6330cc871a47 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c | |||
| @@ -12,15 +12,18 @@ | |||
| 12 | struct file *file_lookup(const char *name) | 12 | struct file *file_lookup(const char *name) |
| 13 | { | 13 | { |
| 14 | struct file *file; | 14 | struct file *file; |
| 15 | const char *file_name = sym_expand_string_value(name); | ||
| 15 | 16 | ||
| 16 | for (file = file_list; file; file = file->next) { | 17 | for (file = file_list; file; file = file->next) { |
| 17 | if (!strcmp(name, file->name)) | 18 | if (!strcmp(name, file->name)) { |
| 19 | free((void *)file_name); | ||
| 18 | return file; | 20 | return file; |
| 21 | } | ||
| 19 | } | 22 | } |
| 20 | 23 | ||
| 21 | file = malloc(sizeof(*file)); | 24 | file = malloc(sizeof(*file)); |
| 22 | memset(file, 0, sizeof(*file)); | 25 | memset(file, 0, sizeof(*file)); |
| 23 | file->name = strdup(name); | 26 | file->name = file_name; |
| 24 | file->next = file_list; | 27 | file->next = file_list; |
| 25 | file_list = file; | 28 | file_list = file; |
| 26 | return file; | 29 | return file; |
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index d8f7236cb0a3..3dbaec185cc4 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
| @@ -304,9 +304,10 @@ void zconf_nextfile(const char *name) | |||
| 304 | memset(buf, 0, sizeof(*buf)); | 304 | memset(buf, 0, sizeof(*buf)); |
| 305 | 305 | ||
| 306 | current_buf->state = YY_CURRENT_BUFFER; | 306 | current_buf->state = YY_CURRENT_BUFFER; |
| 307 | yyin = zconf_fopen(name); | 307 | yyin = zconf_fopen(file->name); |
| 308 | if (!yyin) { | 308 | if (!yyin) { |
| 309 | printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name); | 309 | printf("%s:%d: can't open file \"%s\"\n", |
| 310 | zconf_curname(), zconf_lineno(), file->name); | ||
| 310 | exit(1); | 311 | exit(1); |
| 311 | } | 312 | } |
| 312 | yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); | 313 | yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); |
| @@ -353,7 +354,7 @@ int zconf_lineno(void) | |||
| 353 | return current_pos.lineno; | 354 | return current_pos.lineno; |
| 354 | } | 355 | } |
| 355 | 356 | ||
| 356 | char *zconf_curname(void) | 357 | const char *zconf_curname(void) |
| 357 | { | 358 | { |
| 358 | return current_pos.file ? current_pos.file->name : "<none>"; | 359 | return current_pos.file ? current_pos.file->name : "<none>"; |
| 359 | } | 360 | } |
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index 32a9eefd842c..699d4b265186 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped | |||
| @@ -417,18 +417,18 @@ union yyalloc | |||
| 417 | #endif | 417 | #endif |
| 418 | 418 | ||
| 419 | /* YYFINAL -- State number of the termination state. */ | 419 | /* YYFINAL -- State number of the termination state. */ |
| 420 | #define YYFINAL 3 | 420 | #define YYFINAL 11 |
| 421 | /* YYLAST -- Last index in YYTABLE. */ | 421 | /* YYLAST -- Last index in YYTABLE. */ |
| 422 | #define YYLAST 259 | 422 | #define YYLAST 277 |
| 423 | 423 | ||
| 424 | /* YYNTOKENS -- Number of terminals. */ | 424 | /* YYNTOKENS -- Number of terminals. */ |
| 425 | #define YYNTOKENS 35 | 425 | #define YYNTOKENS 35 |
| 426 | /* YYNNTS -- Number of nonterminals. */ | 426 | /* YYNNTS -- Number of nonterminals. */ |
| 427 | #define YYNNTS 46 | 427 | #define YYNNTS 48 |
| 428 | /* YYNRULES -- Number of rules. */ | 428 | /* YYNRULES -- Number of rules. */ |
| 429 | #define YYNRULES 110 | 429 | #define YYNRULES 113 |
| 430 | /* YYNRULES -- Number of states. */ | 430 | /* YYNRULES -- Number of states. */ |
| 431 | #define YYNSTATES 180 | 431 | #define YYNSTATES 185 |
| 432 | 432 | ||
| 433 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ | 433 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 434 | #define YYUNDEFTOK 2 | 434 | #define YYUNDEFTOK 2 |
| @@ -476,73 +476,74 @@ static const yytype_uint8 yytranslate[] = | |||
| 476 | YYRHS. */ | 476 | YYRHS. */ |
| 477 | static const yytype_uint16 yyprhs[] = | 477 | static const yytype_uint16 yyprhs[] = |
| 478 | { | 478 | { |
| 479 | 0, 0, 3, 5, 6, 9, 12, 15, 20, 23, | 479 | 0, 0, 3, 6, 8, 11, 13, 14, 17, 20, |
| 480 | 28, 33, 37, 39, 41, 43, 45, 47, 49, 51, | 480 | 23, 26, 31, 36, 40, 42, 44, 46, 48, 50, |
| 481 | 53, 55, 57, 59, 61, 63, 67, 70, 74, 77, | 481 | 52, 54, 56, 58, 60, 62, 64, 66, 70, 73, |
| 482 | 81, 84, 85, 88, 91, 94, 97, 100, 103, 107, | 482 | 77, 80, 84, 87, 88, 91, 94, 97, 100, 103, |
| 483 | 112, 117, 122, 128, 132, 133, 137, 138, 141, 145, | 483 | 106, 110, 115, 120, 125, 131, 135, 136, 140, 141, |
| 484 | 148, 150, 154, 155, 158, 161, 164, 167, 170, 175, | 484 | 144, 148, 151, 153, 157, 158, 161, 164, 167, 170, |
| 485 | 179, 182, 187, 188, 191, 195, 197, 201, 202, 205, | 485 | 173, 178, 182, 185, 190, 191, 194, 198, 200, 204, |
| 486 | 208, 211, 215, 218, 220, 224, 225, 228, 231, 234, | 486 | 205, 208, 211, 214, 218, 222, 225, 227, 231, 232, |
| 487 | 238, 242, 245, 248, 251, 252, 255, 258, 261, 266, | 487 | 235, 238, 241, 245, 249, 252, 255, 258, 259, 262, |
| 488 | 267, 270, 272, 274, 277, 280, 283, 285, 288, 289, | 488 | 265, 268, 273, 274, 277, 279, 281, 284, 287, 290, |
| 489 | 292, 294, 298, 302, 306, 309, 313, 317, 319, 321, | 489 | 292, 295, 296, 299, 301, 305, 309, 313, 316, 320, |
| 490 | 322 | 490 | 324, 326, 328, 329 |
| 491 | }; | 491 | }; |
| 492 | 492 | ||
| 493 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ | 493 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 494 | static const yytype_int8 yyrhs[] = | 494 | static const yytype_int8 yyrhs[] = |
| 495 | { | 495 | { |
| 496 | 36, 0, -1, 37, -1, -1, 37, 39, -1, 37, | 496 | 36, 0, -1, 78, 37, -1, 37, -1, 62, 38, |
| 497 | 53, -1, 37, 64, -1, 37, 3, 74, 76, -1, | 497 | -1, 38, -1, -1, 38, 40, -1, 38, 54, -1, |
| 498 | 37, 75, -1, 37, 25, 1, 30, -1, 37, 38, | 498 | 38, 66, -1, 38, 77, -1, 38, 25, 1, 30, |
| 499 | 1, 30, -1, 37, 1, 30, -1, 16, -1, 18, | 499 | -1, 38, 39, 1, 30, -1, 38, 1, 30, -1, |
| 500 | -1, 19, -1, 21, -1, 17, -1, 22, -1, 20, | 500 | 16, -1, 18, -1, 19, -1, 21, -1, 17, -1, |
| 501 | -1, 30, -1, 59, -1, 68, -1, 42, -1, 44, | 501 | 22, -1, 20, -1, 30, -1, 60, -1, 70, -1, |
| 502 | -1, 66, -1, 25, 1, 30, -1, 1, 30, -1, | 502 | 43, -1, 45, -1, 68, -1, 25, 1, 30, -1, |
| 503 | 10, 25, 30, -1, 41, 45, -1, 11, 25, 30, | 503 | 1, 30, -1, 10, 25, 30, -1, 42, 46, -1, |
| 504 | -1, 43, 45, -1, -1, 45, 46, -1, 45, 47, | 504 | 11, 25, 30, -1, 44, 46, -1, -1, 46, 47, |
| 505 | -1, 45, 72, -1, 45, 70, -1, 45, 40, -1, | 505 | -1, 46, 48, -1, 46, 74, -1, 46, 72, -1, |
| 506 | 45, 30, -1, 19, 73, 30, -1, 18, 74, 77, | 506 | 46, 41, -1, 46, 30, -1, 19, 75, 30, -1, |
| 507 | 30, -1, 20, 78, 77, 30, -1, 21, 25, 77, | 507 | 18, 76, 79, 30, -1, 20, 80, 79, 30, -1, |
| 508 | 30, -1, 22, 79, 79, 77, 30, -1, 23, 48, | 508 | 21, 25, 79, 30, -1, 22, 81, 81, 79, 30, |
| 509 | 30, -1, -1, 48, 25, 49, -1, -1, 33, 74, | 509 | -1, 23, 49, 30, -1, -1, 49, 25, 50, -1, |
| 510 | -1, 7, 80, 30, -1, 50, 54, -1, 75, -1, | 510 | -1, 33, 76, -1, 7, 82, 30, -1, 51, 55, |
| 511 | 51, 56, 52, -1, -1, 54, 55, -1, 54, 72, | 511 | -1, 77, -1, 52, 57, 53, -1, -1, 55, 56, |
| 512 | -1, 54, 70, -1, 54, 30, -1, 54, 40, -1, | 512 | -1, 55, 74, -1, 55, 72, -1, 55, 30, -1, |
| 513 | 18, 74, 77, 30, -1, 19, 73, 30, -1, 17, | 513 | 55, 41, -1, 18, 76, 79, 30, -1, 19, 75, |
| 514 | 30, -1, 20, 25, 77, 30, -1, -1, 56, 39, | 514 | 30, -1, 17, 30, -1, 20, 25, 79, 30, -1, |
| 515 | -1, 14, 78, 76, -1, 75, -1, 57, 60, 58, | 515 | -1, 57, 40, -1, 14, 80, 78, -1, 77, -1, |
| 516 | -1, -1, 60, 39, -1, 60, 64, -1, 60, 53, | 516 | 58, 61, 59, -1, -1, 61, 40, -1, 61, 66, |
| 517 | -1, 4, 74, 30, -1, 61, 71, -1, 75, -1, | 517 | -1, 61, 54, -1, 3, 76, 78, -1, 4, 76, |
| 518 | 62, 65, 63, -1, -1, 65, 39, -1, 65, 64, | 518 | 30, -1, 63, 73, -1, 77, -1, 64, 67, 65, |
| 519 | -1, 65, 53, -1, 6, 74, 30, -1, 9, 74, | 519 | -1, -1, 67, 40, -1, 67, 66, -1, 67, 54, |
| 520 | 30, -1, 67, 71, -1, 12, 30, -1, 69, 13, | 520 | -1, 6, 76, 30, -1, 9, 76, 30, -1, 69, |
| 521 | -1, -1, 71, 72, -1, 71, 30, -1, 71, 40, | 521 | 73, -1, 12, 30, -1, 71, 13, -1, -1, 73, |
| 522 | -1, 16, 24, 78, 30, -1, -1, 74, 77, -1, | 522 | 74, -1, 73, 30, -1, 73, 41, -1, 16, 24, |
| 523 | 25, -1, 26, -1, 5, 30, -1, 8, 30, -1, | 523 | 80, 30, -1, -1, 76, 79, -1, 25, -1, 26, |
| 524 | 15, 30, -1, 30, -1, 76, 30, -1, -1, 14, | 524 | -1, 5, 30, -1, 8, 30, -1, 15, 30, -1, |
| 525 | 78, -1, 79, -1, 79, 33, 79, -1, 79, 27, | 525 | 30, -1, 78, 30, -1, -1, 14, 80, -1, 81, |
| 526 | 79, -1, 29, 78, 28, -1, 34, 78, -1, 78, | 526 | -1, 81, 33, 81, -1, 81, 27, 81, -1, 29, |
| 527 | 31, 78, -1, 78, 32, 78, -1, 25, -1, 26, | 527 | 80, 28, -1, 34, 80, -1, 80, 31, 80, -1, |
| 528 | -1, -1, 25, -1 | 528 | 80, 32, 80, -1, 25, -1, 26, -1, -1, 25, |
| 529 | -1 | ||
| 529 | }; | 530 | }; |
| 530 | 531 | ||
| 531 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | 532 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
| 532 | static const yytype_uint16 yyrline[] = | 533 | static const yytype_uint16 yyrline[] = |
| 533 | { | 534 | { |
| 534 | 0, 107, 107, 109, 111, 112, 113, 114, 115, 116, | 535 | 0, 107, 107, 107, 109, 109, 111, 113, 114, 115, |
| 535 | 117, 121, 125, 125, 125, 125, 125, 125, 125, 129, | 536 | 116, 117, 118, 122, 126, 126, 126, 126, 126, 126, |
| 536 | 130, 131, 132, 133, 134, 138, 139, 145, 153, 159, | 537 | 126, 130, 131, 132, 133, 134, 135, 139, 140, 146, |
| 537 | 167, 177, 179, 180, 181, 182, 183, 184, 187, 195, | 538 | 154, 160, 168, 178, 180, 181, 182, 183, 184, 185, |
| 538 | 201, 211, 217, 223, 226, 228, 239, 240, 245, 254, | 539 | 188, 196, 202, 212, 218, 224, 227, 229, 240, 241, |
| 539 | 259, 267, 270, 272, 273, 274, 275, 276, 279, 285, | 540 | 246, 255, 260, 268, 271, 273, 274, 275, 276, 277, |
| 540 | 296, 302, 312, 314, 319, 327, 335, 338, 340, 341, | 541 | 280, 286, 297, 303, 313, 315, 320, 328, 336, 339, |
| 541 | 342, 347, 354, 359, 367, 370, 372, 373, 374, 377, | 542 | 341, 342, 343, 348, 355, 362, 367, 375, 378, 380, |
| 542 | 385, 392, 399, 405, 412, 414, 415, 416, 419, 427, | 543 | 381, 382, 385, 393, 400, 407, 413, 420, 422, 423, |
| 543 | 429, 434, 435, 438, 439, 440, 444, 445, 448, 449, | 544 | 424, 427, 435, 437, 442, 443, 446, 447, 448, 452, |
| 544 | 452, 453, 454, 455, 456, 457, 458, 461, 462, 465, | 545 | 453, 456, 457, 460, 461, 462, 463, 464, 465, 466, |
| 545 | 466 | 546 | 469, 470, 473, 474 |
| 546 | }; | 547 | }; |
| 547 | #endif | 548 | #endif |
| 548 | 549 | ||
| @@ -557,17 +558,17 @@ static const char *const yytname[] = | |||
| 557 | "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE", | 558 | "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE", |
| 558 | "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", | 559 | "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", |
| 559 | "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", | 560 | "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", |
| 560 | "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt", | 561 | "T_NOT", "$accept", "input", "start", "stmt_list", "option_name", |
| 561 | "option_error", "config_entry_start", "config_stmt", | 562 | "common_stmt", "option_error", "config_entry_start", "config_stmt", |
| 562 | "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", | 563 | "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", |
| 563 | "config_option", "symbol_option", "symbol_option_list", | 564 | "config_option", "symbol_option", "symbol_option_list", |
| 564 | "symbol_option_arg", "choice", "choice_entry", "choice_end", | 565 | "symbol_option_arg", "choice", "choice_entry", "choice_end", |
| 565 | "choice_stmt", "choice_option_list", "choice_option", "choice_block", | 566 | "choice_stmt", "choice_option_list", "choice_option", "choice_block", |
| 566 | "if_entry", "if_end", "if_stmt", "if_block", "menu", "menu_entry", | 567 | "if_entry", "if_end", "if_stmt", "if_block", "mainmenu_stmt", "menu", |
| 567 | "menu_end", "menu_stmt", "menu_block", "source_stmt", "comment", | 568 | "menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt", |
| 568 | "comment_stmt", "help_start", "help", "depends_list", "depends", | 569 | "comment", "comment_stmt", "help_start", "help", "depends_list", |
| 569 | "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", "symbol", | 570 | "depends", "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", |
| 570 | "word_opt", 0 | 571 | "symbol", "word_opt", 0 |
| 571 | }; | 572 | }; |
| 572 | #endif | 573 | #endif |
| 573 | 574 | ||
| @@ -586,35 +587,35 @@ static const yytype_uint16 yytoknum[] = | |||
| 586 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | 587 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| 587 | static const yytype_uint8 yyr1[] = | 588 | static const yytype_uint8 yyr1[] = |
| 588 | { | 589 | { |
| 589 | 0, 35, 36, 37, 37, 37, 37, 37, 37, 37, | 590 | 0, 35, 36, 36, 37, 37, 38, 38, 38, 38, |
| 590 | 37, 37, 38, 38, 38, 38, 38, 38, 38, 39, | 591 | 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, |
| 591 | 39, 39, 39, 39, 39, 40, 40, 41, 42, 43, | 592 | 39, 40, 40, 40, 40, 40, 40, 41, 41, 42, |
| 592 | 44, 45, 45, 45, 45, 45, 45, 45, 46, 46, | 593 | 43, 44, 45, 46, 46, 46, 46, 46, 46, 46, |
| 593 | 46, 46, 46, 47, 48, 48, 49, 49, 50, 51, | 594 | 47, 47, 47, 47, 47, 48, 49, 49, 50, 50, |
| 594 | 52, 53, 54, 54, 54, 54, 54, 54, 55, 55, | 595 | 51, 52, 53, 54, 55, 55, 55, 55, 55, 55, |
| 595 | 55, 55, 56, 56, 57, 58, 59, 60, 60, 60, | 596 | 56, 56, 56, 56, 57, 57, 58, 59, 60, 61, |
| 596 | 60, 61, 62, 63, 64, 65, 65, 65, 65, 66, | 597 | 61, 61, 61, 62, 63, 64, 65, 66, 67, 67, |
| 597 | 67, 68, 69, 70, 71, 71, 71, 71, 72, 73, | 598 | 67, 67, 68, 69, 70, 71, 72, 73, 73, 73, |
| 598 | 73, 74, 74, 75, 75, 75, 76, 76, 77, 77, | 599 | 73, 74, 75, 75, 76, 76, 77, 77, 77, 78, |
| 599 | 78, 78, 78, 78, 78, 78, 78, 79, 79, 80, | 600 | 78, 79, 79, 80, 80, 80, 80, 80, 80, 80, |
| 600 | 80 | 601 | 81, 81, 82, 82 |
| 601 | }; | 602 | }; |
| 602 | 603 | ||
| 603 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | 604 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
| 604 | static const yytype_uint8 yyr2[] = | 605 | static const yytype_uint8 yyr2[] = |
| 605 | { | 606 | { |
| 606 | 0, 2, 1, 0, 2, 2, 2, 4, 2, 4, | 607 | 0, 2, 2, 1, 2, 1, 0, 2, 2, 2, |
| 607 | 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, | 608 | 2, 4, 4, 3, 1, 1, 1, 1, 1, 1, |
| 608 | 1, 1, 1, 1, 1, 3, 2, 3, 2, 3, | 609 | 1, 1, 1, 1, 1, 1, 1, 3, 2, 3, |
| 609 | 2, 0, 2, 2, 2, 2, 2, 2, 3, 4, | 610 | 2, 3, 2, 0, 2, 2, 2, 2, 2, 2, |
| 610 | 4, 4, 5, 3, 0, 3, 0, 2, 3, 2, | 611 | 3, 4, 4, 4, 5, 3, 0, 3, 0, 2, |
| 611 | 1, 3, 0, 2, 2, 2, 2, 2, 4, 3, | 612 | 3, 2, 1, 3, 0, 2, 2, 2, 2, 2, |
| 612 | 2, 4, 0, 2, 3, 1, 3, 0, 2, 2, | 613 | 4, 3, 2, 4, 0, 2, 3, 1, 3, 0, |
| 613 | 2, 3, 2, 1, 3, 0, 2, 2, 2, 3, | 614 | 2, 2, 2, 3, 3, 2, 1, 3, 0, 2, |
| 614 | 3, 2, 2, 2, 0, 2, 2, 2, 4, 0, | 615 | 2, 2, 3, 3, 2, 2, 2, 0, 2, 2, |
| 615 | 2, 1, 1, 2, 2, 2, 1, 2, 0, 2, | 616 | 2, 4, 0, 2, 1, 1, 2, 2, 2, 1, |
| 616 | 1, 3, 3, 3, 2, 3, 3, 1, 1, 0, | 617 | 2, 0, 2, 1, 3, 3, 3, 2, 3, 3, |
| 617 | 1 | 618 | 1, 1, 0, 1 |
| 618 | }; | 619 | }; |
| 619 | 620 | ||
| 620 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state | 621 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| @@ -622,158 +623,165 @@ static const yytype_uint8 yyr2[] = | |||
| 622 | means the default is an error. */ | 623 | means the default is an error. */ |
| 623 | static const yytype_uint8 yydefact[] = | 624 | static const yytype_uint8 yydefact[] = |
| 624 | { | 625 | { |
| 625 | 3, 0, 0, 1, 0, 0, 0, 0, 0, 109, | 626 | 6, 0, 99, 0, 3, 0, 6, 6, 94, 95, |
| 626 | 0, 0, 0, 0, 0, 0, 12, 16, 13, 14, | 627 | 0, 1, 0, 0, 0, 0, 112, 0, 0, 0, |
| 627 | 18, 15, 17, 0, 19, 0, 4, 31, 22, 31, | 628 | 0, 0, 0, 14, 18, 15, 16, 20, 17, 19, |
| 628 | 23, 52, 62, 5, 67, 20, 84, 75, 6, 24, | 629 | 0, 21, 0, 7, 33, 24, 33, 25, 54, 64, |
| 629 | 84, 21, 8, 11, 91, 92, 0, 0, 93, 0, | 630 | 8, 69, 22, 87, 78, 9, 26, 87, 23, 10, |
| 630 | 110, 0, 94, 0, 0, 0, 107, 108, 0, 0, | 631 | 0, 100, 2, 73, 13, 0, 96, 0, 113, 0, |
| 631 | 0, 100, 95, 0, 0, 0, 0, 0, 0, 0, | 632 | 97, 0, 0, 0, 110, 111, 0, 0, 0, 103, |
| 632 | 0, 0, 0, 96, 7, 71, 79, 48, 80, 27, | 633 | 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 633 | 29, 0, 104, 0, 0, 64, 0, 0, 9, 10, | 634 | 0, 74, 82, 50, 83, 29, 31, 0, 107, 0, |
| 634 | 0, 0, 0, 0, 89, 0, 0, 0, 44, 0, | 635 | 0, 66, 0, 0, 11, 12, 0, 0, 0, 0, |
| 635 | 37, 36, 32, 33, 0, 35, 34, 0, 0, 89, | 636 | 92, 0, 0, 0, 46, 0, 39, 38, 34, 35, |
| 636 | 0, 56, 57, 53, 55, 54, 63, 51, 50, 68, | 637 | 0, 37, 36, 0, 0, 92, 0, 58, 59, 55, |
| 637 | 70, 66, 69, 65, 86, 87, 85, 76, 78, 74, | 638 | 57, 56, 65, 53, 52, 70, 72, 68, 71, 67, |
| 638 | 77, 73, 97, 103, 105, 106, 102, 101, 26, 82, | 639 | 89, 90, 88, 79, 81, 77, 80, 76, 106, 108, |
| 639 | 0, 98, 0, 98, 98, 98, 0, 0, 0, 83, | 640 | 109, 105, 104, 28, 85, 0, 101, 0, 101, 101, |
| 640 | 60, 98, 0, 98, 0, 0, 0, 38, 90, 0, | 641 | 101, 0, 0, 0, 86, 62, 101, 0, 101, 0, |
| 641 | 0, 98, 46, 43, 25, 0, 59, 0, 88, 99, | 642 | 0, 0, 40, 93, 0, 0, 101, 48, 45, 27, |
| 642 | 39, 40, 41, 0, 0, 45, 58, 61, 42, 47 | 643 | 0, 61, 0, 91, 102, 41, 42, 43, 0, 0, |
| 644 | 47, 60, 63, 44, 49 | ||
| 643 | }; | 645 | }; |
| 644 | 646 | ||
| 645 | /* YYDEFGOTO[NTERM-NUM]. */ | 647 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 646 | static const yytype_int16 yydefgoto[] = | 648 | static const yytype_int16 yydefgoto[] = |
| 647 | { | 649 | { |
| 648 | -1, 1, 2, 25, 26, 101, 27, 28, 29, 30, | 650 | -1, 3, 4, 5, 32, 33, 107, 34, 35, 36, |
| 649 | 65, 102, 103, 147, 175, 31, 32, 117, 33, 67, | 651 | 37, 73, 108, 109, 152, 180, 38, 39, 123, 40, |
| 650 | 113, 68, 34, 121, 35, 69, 36, 37, 129, 38, | 652 | 75, 119, 76, 41, 127, 42, 77, 6, 43, 44, |
| 651 | 71, 39, 40, 41, 104, 105, 70, 106, 142, 143, | 653 | 135, 45, 79, 46, 47, 48, 110, 111, 78, 112, |
| 652 | 42, 74, 156, 60, 61, 51 | 654 | 147, 148, 49, 7, 161, 68, 69, 59 |
| 653 | }; | 655 | }; |
| 654 | 656 | ||
| 655 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | 657 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 656 | STATE-NUM. */ | 658 | STATE-NUM. */ |
| 657 | #define YYPACT_NINF -80 | 659 | #define YYPACT_NINF -89 |
| 658 | static const yytype_int16 yypact[] = | 660 | static const yytype_int16 yypact[] = |
| 659 | { | 661 | { |
| 660 | -80, 2, 132, -80, -13, -1, -1, -2, -1, 9, | 662 | 3, 4, -89, 20, -89, 100, -89, 7, -89, -89, |
| 661 | 33, -1, 27, 40, -3, 38, -80, -80, -80, -80, | 663 | -8, -89, 17, 4, 28, 4, 37, 36, 4, 68, |
| 662 | -80, -80, -80, 71, -80, 77, -80, -80, -80, -80, | 664 | 87, -18, 69, -89, -89, -89, -89, -89, -89, -89, |
| 663 | -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, | 665 | 128, -89, 138, -89, -89, -89, -89, -89, -89, -89, |
| 664 | -80, -80, -80, -80, -80, -80, 57, 61, -80, 63, | 666 | -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, |
| 665 | -80, 76, -80, 87, 101, 133, -80, -80, -3, -3, | 667 | 127, -89, -89, 110, -89, 126, -89, 136, -89, 137, |
| 666 | 195, -6, -80, 136, 149, 39, 104, 65, 150, 5, | 668 | -89, 147, 150, 152, -89, -89, -18, -18, 171, -14, |
| 667 | 194, 5, 167, -80, 176, -80, -80, -80, -80, -80, | 669 | -89, 153, 157, 34, 67, 180, 233, 220, 207, 220, |
| 668 | -80, 68, -80, -3, -3, 176, 72, 72, -80, -80, | 670 | 154, -89, -89, -89, -89, -89, -89, 0, -89, -18, |
| 669 | 177, 187, 78, -1, -1, -3, 196, 72, -80, 222, | 671 | -18, 110, 44, 44, -89, -89, 163, 174, 182, 4, |
| 670 | -80, -80, -80, -80, 221, -80, -80, 205, -1, -1, | 672 | 4, -18, 194, 44, -89, 219, -89, -89, -89, -89, |
| 671 | 211, -80, -80, -80, -80, -80, -80, -80, -80, -80, | 673 | 223, -89, -89, 203, 4, 4, 215, -89, -89, -89, |
| 672 | -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, | 674 | -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, |
| 673 | -80, -80, -80, -80, 206, -80, -80, -80, -80, -80, | 675 | -89, -89, -89, -89, -89, -89, -89, -89, -89, 213, |
| 674 | -3, 223, 209, 223, 197, 223, 72, 7, 210, -80, | 676 | -89, -89, -89, -89, -89, -18, 232, 227, 232, -5, |
| 675 | -80, 223, 212, 223, 201, -3, 213, -80, -80, 214, | 677 | 232, 44, 35, 234, -89, -89, 232, 235, 232, 224, |
| 676 | 215, 223, 208, -80, -80, 216, -80, 217, -80, 113, | 678 | -18, 236, -89, -89, 237, 238, 232, 216, -89, -89, |
| 677 | -80, -80, -80, 218, -1, -80, -80, -80, -80, -80 | 679 | 240, -89, 241, -89, 71, -89, -89, -89, 242, 4, |
| 680 | -89, -89, -89, -89, -89 | ||
| 678 | }; | 681 | }; |
| 679 | 682 | ||
| 680 | /* YYPGOTO[NTERM-NUM]. */ | 683 | /* YYPGOTO[NTERM-NUM]. */ |
| 681 | static const yytype_int16 yypgoto[] = | 684 | static const yytype_int16 yypgoto[] = |
| 682 | { | 685 | { |
| 683 | -80, -80, -80, -80, 122, -34, -80, -80, -80, -80, | 686 | -89, -89, 255, 267, -89, 47, -57, -89, -89, -89, |
| 684 | 220, -80, -80, -80, -80, -80, -80, -80, 59, -80, | 687 | -89, 239, -89, -89, -89, -89, -89, -89, -89, 130, |
| 685 | -80, -80, -80, -80, -80, -80, -80, -80, -80, 125, | 688 | -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, |
| 686 | -80, -80, -80, -80, -80, 183, 219, 22, 142, -5, | 689 | -89, 181, -89, -89, -89, -89, -89, 199, 229, 16, |
| 687 | 147, 192, 69, -54, -79, -80 | 690 | 162, -1, 74, -7, 103, -65, -88, -89 |
| 688 | }; | 691 | }; |
| 689 | 692 | ||
| 690 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | 693 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 691 | positive, shift that token. If negative, reduce the rule which | 694 | positive, shift that token. If negative, reduce the rule which |
| 692 | number is the opposite. If zero, do what YYDEFACT says. | 695 | number is the opposite. If zero, do what YYDEFACT says. |
| 693 | If YYTABLE_NINF, syntax error. */ | 696 | If YYTABLE_NINF, syntax error. */ |
| 694 | #define YYTABLE_NINF -82 | 697 | #define YYTABLE_NINF -85 |
| 695 | static const yytype_int16 yytable[] = | 698 | static const yytype_int16 yytable[] = |
| 696 | { | 699 | { |
| 697 | 46, 47, 3, 49, 81, 82, 53, 136, 137, 6, | 700 | 10, 87, 88, 53, 141, 142, 1, 64, 65, 160, |
| 698 | 7, 8, 9, 10, 11, 12, 13, 43, 146, 14, | 701 | 1, 66, 55, 92, 57, 151, 67, 61, 118, 93, |
| 699 | 15, 86, 56, 57, 44, 45, 58, 87, 48, 134, | 702 | 11, 131, 2, 131, 139, 140, 89, 90, 138, 8, |
| 700 | 135, 59, 162, 112, 50, 24, 125, 163, 125, -28, | 703 | 9, 89, 90, 2, -30, 96, 149, 51, -30, -30, |
| 701 | 90, 144, -28, -28, -28, -28, -28, -28, -28, -28, | 704 | -30, -30, -30, -30, -30, -30, 97, 54, -30, -30, |
| 702 | -28, 91, 54, -28, -28, 92, -28, 93, 94, 95, | 705 | 98, -30, 99, 100, 101, 102, 103, 104, 56, 105, |
| 703 | 96, 97, 98, 52, 99, 55, 90, 161, 62, 100, | 706 | 167, 91, 58, 166, 106, 168, 60, -32, 96, 64, |
| 704 | -49, -49, 63, -49, -49, -49, -49, 91, 64, -49, | 707 | 65, -32, -32, -32, -32, -32, -32, -32, -32, 97, |
| 705 | -49, 92, 107, 108, 109, 110, 154, 73, 141, 115, | 708 | 159, -32, -32, 98, -32, 99, 100, 101, 102, 103, |
| 706 | 99, 75, 126, 76, 126, 111, 133, 56, 57, 83, | 709 | 104, 121, 105, 62, 132, 174, 132, 106, 146, 70, |
| 707 | 84, 169, 140, 151, -30, 90, 77, -30, -30, -30, | 710 | -5, 12, 89, 90, 13, 14, 15, 16, 17, 18, |
| 708 | -30, -30, -30, -30, -30, -30, 91, 78, -30, -30, | 711 | 19, 20, 63, 156, 21, 22, 23, 24, 25, 26, |
| 709 | 92, -30, 93, 94, 95, 96, 97, 98, 120, 99, | 712 | 27, 28, 29, 122, 125, 30, 133, -4, 12, 71, |
| 710 | 128, 79, -2, 4, 100, 5, 6, 7, 8, 9, | 713 | 31, 13, 14, 15, 16, 17, 18, 19, 20, 72, |
| 711 | 10, 11, 12, 13, 83, 84, 14, 15, 16, 17, | 714 | 51, 21, 22, 23, 24, 25, 26, 27, 28, 29, |
| 712 | 18, 19, 20, 21, 22, 7, 8, 23, 10, 11, | 715 | 124, 129, 30, 137, -84, 96, 81, 31, -84, -84, |
| 713 | 12, 13, 24, 80, 14, 15, 88, -81, 90, 179, | 716 | -84, -84, -84, -84, -84, -84, 82, 83, -84, -84, |
| 714 | -81, -81, -81, -81, -81, -81, -81, -81, -81, 89, | 717 | 98, -84, -84, -84, -84, -84, -84, 84, 184, 105, |
| 715 | 24, -81, -81, 92, -81, -81, -81, -81, -81, -81, | 718 | 85, 96, 86, 94, 130, -51, -51, 95, -51, -51, |
| 716 | 116, 119, 99, 127, 122, 90, 130, 124, -72, -72, | 719 | -51, -51, 97, 143, -51, -51, 98, 113, 114, 115, |
| 717 | -72, -72, -72, -72, -72, -72, 132, 138, -72, -72, | 720 | 116, 2, 89, 90, 144, 105, 145, 126, 96, 134, |
| 718 | 92, 155, 158, 159, 160, 118, 123, 139, 131, 99, | 721 | 117, -75, -75, -75, -75, -75, -75, -75, -75, 150, |
| 719 | 165, 145, 167, 148, 124, 73, 83, 84, 83, 84, | 722 | 153, -75, -75, 98, 13, 14, 15, 16, 17, 18, |
| 720 | 173, 168, 83, 84, 149, 150, 153, 155, 84, 157, | 723 | 19, 20, 105, 155, 21, 22, 154, 130, 14, 15, |
| 721 | 164, 174, 166, 170, 171, 172, 176, 177, 178, 66, | 724 | 158, 17, 18, 19, 20, 90, 160, 21, 22, 179, |
| 722 | 114, 152, 85, 0, 0, 0, 0, 0, 0, 72 | 725 | 31, 163, 164, 165, 173, 89, 90, 162, 128, 170, |
| 726 | 136, 172, 52, 31, 169, 171, 175, 176, 177, 178, | ||
| 727 | 181, 182, 183, 50, 120, 74, 80, 157 | ||
| 723 | }; | 728 | }; |
| 724 | 729 | ||
| 725 | static const yytype_int16 yycheck[] = | 730 | static const yytype_uint8 yycheck[] = |
| 726 | { | 731 | { |
| 727 | 5, 6, 0, 8, 58, 59, 11, 86, 87, 4, | 732 | 1, 66, 67, 10, 92, 93, 3, 25, 26, 14, |
| 728 | 5, 6, 7, 8, 9, 10, 11, 30, 97, 14, | 733 | 3, 29, 13, 27, 15, 103, 34, 18, 75, 33, |
| 729 | 15, 27, 25, 26, 25, 26, 29, 33, 30, 83, | 734 | 0, 78, 30, 80, 89, 90, 31, 32, 28, 25, |
| 730 | 84, 34, 25, 67, 25, 30, 70, 30, 72, 0, | 735 | 26, 31, 32, 30, 0, 1, 101, 30, 4, 5, |
| 731 | 1, 95, 3, 4, 5, 6, 7, 8, 9, 10, | ||
| 732 | 11, 12, 25, 14, 15, 16, 17, 18, 19, 20, | ||
| 733 | 21, 22, 23, 30, 25, 25, 1, 146, 30, 30, | ||
| 734 | 5, 6, 1, 8, 9, 10, 11, 12, 1, 14, | ||
| 735 | 15, 16, 17, 18, 19, 20, 140, 30, 93, 67, | ||
| 736 | 25, 30, 70, 30, 72, 30, 28, 25, 26, 31, | ||
| 737 | 32, 155, 24, 108, 0, 1, 30, 3, 4, 5, | ||
| 738 | 6, 7, 8, 9, 10, 11, 12, 30, 14, 15, | 736 | 6, 7, 8, 9, 10, 11, 12, 30, 14, 15, |
| 739 | 16, 17, 18, 19, 20, 21, 22, 23, 69, 25, | 737 | 16, 17, 18, 19, 20, 21, 22, 23, 30, 25, |
| 740 | 71, 30, 0, 1, 30, 3, 4, 5, 6, 7, | 738 | 25, 68, 25, 151, 30, 30, 30, 0, 1, 25, |
| 741 | 8, 9, 10, 11, 31, 32, 14, 15, 16, 17, | 739 | 26, 4, 5, 6, 7, 8, 9, 10, 11, 12, |
| 742 | 18, 19, 20, 21, 22, 5, 6, 25, 8, 9, | 740 | 145, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 743 | 10, 11, 30, 30, 14, 15, 30, 0, 1, 174, | 741 | 23, 75, 25, 25, 78, 160, 80, 30, 99, 30, |
| 744 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 30, | 742 | 0, 1, 31, 32, 4, 5, 6, 7, 8, 9, |
| 743 | 10, 11, 25, 114, 14, 15, 16, 17, 18, 19, | ||
| 744 | 20, 21, 22, 76, 77, 25, 79, 0, 1, 1, | ||
| 745 | 30, 4, 5, 6, 7, 8, 9, 10, 11, 1, | ||
| 745 | 30, 14, 15, 16, 17, 18, 19, 20, 21, 22, | 746 | 30, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 746 | 68, 69, 25, 71, 69, 1, 71, 30, 4, 5, | 747 | 76, 77, 25, 79, 0, 1, 30, 30, 4, 5, |
| 747 | 6, 7, 8, 9, 10, 11, 30, 30, 14, 15, | 748 | 6, 7, 8, 9, 10, 11, 30, 30, 14, 15, |
| 748 | 16, 14, 143, 144, 145, 68, 69, 30, 71, 25, | 749 | 16, 17, 18, 19, 20, 21, 22, 30, 179, 25, |
| 749 | 151, 25, 153, 1, 30, 30, 31, 32, 31, 32, | 750 | 30, 1, 30, 30, 30, 5, 6, 30, 8, 9, |
| 750 | 161, 30, 31, 32, 13, 30, 25, 14, 32, 30, | 751 | 10, 11, 12, 30, 14, 15, 16, 17, 18, 19, |
| 751 | 30, 33, 30, 30, 30, 30, 30, 30, 30, 29, | 752 | 20, 30, 31, 32, 30, 25, 24, 77, 1, 79, |
| 752 | 67, 109, 60, -1, -1, -1, -1, -1, -1, 40 | 753 | 30, 4, 5, 6, 7, 8, 9, 10, 11, 25, |
| 754 | 1, 14, 15, 16, 4, 5, 6, 7, 8, 9, | ||
| 755 | 10, 11, 25, 30, 14, 15, 13, 30, 5, 6, | ||
| 756 | 25, 8, 9, 10, 11, 32, 14, 14, 15, 33, | ||
| 757 | 30, 148, 149, 150, 30, 31, 32, 30, 77, 156, | ||
| 758 | 79, 158, 7, 30, 30, 30, 30, 30, 30, 166, | ||
| 759 | 30, 30, 30, 6, 75, 36, 47, 115 | ||
| 753 | }; | 760 | }; |
| 754 | 761 | ||
| 755 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing | 762 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 756 | symbol of state STATE-NUM. */ | 763 | symbol of state STATE-NUM. */ |
| 757 | static const yytype_uint8 yystos[] = | 764 | static const yytype_uint8 yystos[] = |
| 758 | { | 765 | { |
| 759 | 0, 36, 37, 0, 1, 3, 4, 5, 6, 7, | 766 | 0, 3, 30, 36, 37, 38, 62, 78, 25, 26, |
| 760 | 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, | 767 | 76, 0, 1, 4, 5, 6, 7, 8, 9, 10, |
| 761 | 20, 21, 22, 25, 30, 38, 39, 41, 42, 43, | 768 | 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 762 | 44, 50, 51, 53, 57, 59, 61, 62, 64, 66, | 769 | 25, 30, 39, 40, 42, 43, 44, 45, 51, 52, |
| 763 | 67, 68, 75, 30, 25, 26, 74, 74, 30, 74, | 770 | 54, 58, 60, 63, 64, 66, 68, 69, 70, 77, |
| 764 | 25, 80, 30, 74, 25, 25, 25, 26, 29, 34, | 771 | 38, 30, 37, 78, 30, 76, 30, 76, 25, 82, |
| 765 | 78, 79, 30, 1, 1, 45, 45, 54, 56, 60, | 772 | 30, 76, 25, 25, 25, 26, 29, 34, 80, 81, |
| 766 | 71, 65, 71, 30, 76, 30, 30, 30, 30, 30, | 773 | 30, 1, 1, 46, 46, 55, 57, 61, 73, 67, |
| 767 | 30, 78, 78, 31, 32, 76, 27, 33, 30, 30, | 774 | 73, 30, 30, 30, 30, 30, 30, 80, 80, 31, |
| 768 | 1, 12, 16, 18, 19, 20, 21, 22, 23, 25, | 775 | 32, 78, 27, 33, 30, 30, 1, 12, 16, 18, |
| 769 | 30, 40, 46, 47, 69, 70, 72, 17, 18, 19, | 776 | 19, 20, 21, 22, 23, 25, 30, 41, 47, 48, |
| 770 | 20, 30, 40, 55, 70, 72, 39, 52, 75, 39, | 777 | 71, 72, 74, 17, 18, 19, 20, 30, 41, 56, |
| 771 | 53, 58, 64, 75, 30, 40, 72, 39, 53, 63, | 778 | 72, 74, 40, 53, 77, 40, 54, 59, 66, 77, |
| 772 | 64, 75, 30, 28, 78, 78, 79, 79, 30, 30, | 779 | 30, 41, 74, 40, 54, 65, 66, 77, 28, 80, |
| 773 | 24, 74, 73, 74, 78, 25, 79, 48, 1, 13, | 780 | 80, 81, 81, 30, 30, 24, 76, 75, 76, 80, |
| 774 | 30, 74, 73, 25, 78, 14, 77, 30, 77, 77, | 781 | 25, 81, 49, 1, 13, 30, 76, 75, 25, 80, |
| 775 | 77, 79, 25, 30, 30, 77, 30, 77, 30, 78, | 782 | 14, 79, 30, 79, 79, 79, 81, 25, 30, 30, |
| 776 | 30, 30, 30, 77, 33, 49, 30, 30, 30, 74 | 783 | 79, 30, 79, 30, 80, 30, 30, 30, 79, 33, |
| 784 | 50, 30, 30, 30, 76 | ||
| 777 | }; | 785 | }; |
| 778 | 786 | ||
| 779 | #define yyerrok (yyerrstatus = 0) | 787 | #define yyerrok (yyerrstatus = 0) |
| @@ -1284,7 +1292,7 @@ yydestruct (yymsg, yytype, yyvaluep) | |||
| 1284 | 1292 | ||
| 1285 | switch (yytype) | 1293 | switch (yytype) |
| 1286 | { | 1294 | { |
| 1287 | case 51: /* "choice_entry" */ | 1295 | case 52: /* "choice_entry" */ |
| 1288 | 1296 | ||
| 1289 | { | 1297 | { |
| 1290 | fprintf(stderr, "%s:%d: missing end statement for this entry\n", | 1298 | fprintf(stderr, "%s:%d: missing end statement for this entry\n", |
| @@ -1294,7 +1302,7 @@ yydestruct (yymsg, yytype, yyvaluep) | |||
| 1294 | }; | 1302 | }; |
| 1295 | 1303 | ||
| 1296 | break; | 1304 | break; |
| 1297 | case 57: /* "if_entry" */ | 1305 | case 58: /* "if_entry" */ |
| 1298 | 1306 | ||
| 1299 | { | 1307 | { |
| 1300 | fprintf(stderr, "%s:%d: missing end statement for this entry\n", | 1308 | fprintf(stderr, "%s:%d: missing end statement for this entry\n", |
| @@ -1304,7 +1312,7 @@ yydestruct (yymsg, yytype, yyvaluep) | |||
| 1304 | }; | 1312 | }; |
| 1305 | 1313 | ||
| 1306 | break; | 1314 | break; |
| 1307 | case 62: /* "menu_entry" */ | 1315 | case 64: /* "menu_entry" */ |
| 1308 | 1316 | ||
| 1309 | { | 1317 | { |
| 1310 | fprintf(stderr, "%s:%d: missing end statement for this entry\n", | 1318 | fprintf(stderr, "%s:%d: missing end statement for this entry\n", |
| @@ -1614,39 +1622,39 @@ yyreduce: | |||
| 1614 | YY_REDUCE_PRINT (yyn); | 1622 | YY_REDUCE_PRINT (yyn); |
| 1615 | switch (yyn) | 1623 | switch (yyn) |
| 1616 | { | 1624 | { |
| 1617 | case 8: | 1625 | case 10: |
| 1618 | 1626 | ||
| 1619 | { zconf_error("unexpected end statement"); ;} | 1627 | { zconf_error("unexpected end statement"); ;} |
| 1620 | break; | 1628 | break; |
| 1621 | 1629 | ||
| 1622 | case 9: | 1630 | case 11: |
| 1623 | 1631 | ||
| 1624 | { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); ;} | 1632 | { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); ;} |
| 1625 | break; | 1633 | break; |
| 1626 | 1634 | ||
| 1627 | case 10: | 1635 | case 12: |
| 1628 | 1636 | ||
| 1629 | { | 1637 | { |
| 1630 | zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name); | 1638 | zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name); |
| 1631 | ;} | 1639 | ;} |
| 1632 | break; | 1640 | break; |
| 1633 | 1641 | ||
| 1634 | case 11: | 1642 | case 13: |
| 1635 | 1643 | ||
| 1636 | { zconf_error("invalid statement"); ;} | 1644 | { zconf_error("invalid statement"); ;} |
| 1637 | break; | 1645 | break; |
| 1638 | 1646 | ||
| 1639 | case 25: | 1647 | case 27: |
| 1640 | 1648 | ||
| 1641 | { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;} | 1649 | { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;} |
| 1642 | break; | 1650 | break; |
| 1643 | 1651 | ||
| 1644 | case 26: | 1652 | case 28: |
| 1645 | 1653 | ||
| 1646 | { zconf_error("invalid option"); ;} | 1654 | { zconf_error("invalid option"); ;} |
| 1647 | break; | 1655 | break; |
| 1648 | 1656 | ||
| 1649 | case 27: | 1657 | case 29: |
| 1650 | 1658 | ||
| 1651 | { | 1659 | { |
| 1652 | struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); | 1660 | struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); |
| @@ -1656,7 +1664,7 @@ yyreduce: | |||
| 1656 | ;} | 1664 | ;} |
| 1657 | break; | 1665 | break; |
| 1658 | 1666 | ||
| 1659 | case 28: | 1667 | case 30: |
| 1660 | 1668 | ||
| 1661 | { | 1669 | { |
| 1662 | menu_end_entry(); | 1670 | menu_end_entry(); |
| @@ -1664,7 +1672,7 @@ yyreduce: | |||
| 1664 | ;} | 1672 | ;} |
| 1665 | break; | 1673 | break; |
| 1666 | 1674 | ||
| 1667 | case 29: | 1675 | case 31: |
| 1668 | 1676 | ||
| 1669 | { | 1677 | { |
| 1670 | struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); | 1678 | struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); |
| @@ -1674,7 +1682,7 @@ yyreduce: | |||
| 1674 | ;} | 1682 | ;} |
| 1675 | break; | 1683 | break; |
| 1676 | 1684 | ||
| 1677 | case 30: | 1685 | case 32: |
| 1678 | 1686 | ||
| 1679 | { | 1687 | { |
| 1680 | if (current_entry->prompt) | 1688 | if (current_entry->prompt) |
| @@ -1686,7 +1694,7 @@ yyreduce: | |||
| 1686 | ;} | 1694 | ;} |
| 1687 | break; | 1695 | break; |
| 1688 | 1696 | ||
| 1689 | case 38: | 1697 | case 40: |
| 1690 | 1698 | ||
| 1691 | { | 1699 | { |
| 1692 | menu_set_type((yyvsp[(1) - (3)].id)->stype); | 1700 | menu_set_type((yyvsp[(1) - (3)].id)->stype); |
| @@ -1696,7 +1704,7 @@ yyreduce: | |||
| 1696 | ;} | 1704 | ;} |
| 1697 | break; | 1705 | break; |
| 1698 | 1706 | ||
| 1699 | case 39: | 1707 | case 41: |
| 1700 | 1708 | ||
| 1701 | { | 1709 | { |
| 1702 | menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); | 1710 | menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); |
| @@ -1704,7 +1712,7 @@ yyreduce: | |||
| 1704 | ;} | 1712 | ;} |
| 1705 | break; | 1713 | break; |
| 1706 | 1714 | ||
| 1707 | case 40: | 1715 | case 42: |
| 1708 | 1716 | ||
| 1709 | { | 1717 | { |
| 1710 | menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr)); | 1718 | menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr)); |
| @@ -1716,7 +1724,7 @@ yyreduce: | |||
| 1716 | ;} | 1724 | ;} |
| 1717 | break; | 1725 | break; |
| 1718 | 1726 | ||
| 1719 | case 41: | 1727 | case 43: |
| 1720 | 1728 | ||
| 1721 | { | 1729 | { |
| 1722 | menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); | 1730 | menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); |
| @@ -1724,7 +1732,7 @@ yyreduce: | |||
| 1724 | ;} | 1732 | ;} |
| 1725 | break; | 1733 | break; |
| 1726 | 1734 | ||
| 1727 | case 42: | 1735 | case 44: |
| 1728 | 1736 | ||
| 1729 | { | 1737 | { |
| 1730 | menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr)); | 1738 | menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr)); |
| @@ -1732,7 +1740,7 @@ yyreduce: | |||
| 1732 | ;} | 1740 | ;} |
| 1733 | break; | 1741 | break; |
| 1734 | 1742 | ||
| 1735 | case 45: | 1743 | case 47: |
| 1736 | 1744 | ||
| 1737 | { | 1745 | { |
| 1738 | struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string))); | 1746 | struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string))); |
| @@ -1744,17 +1752,17 @@ yyreduce: | |||
| 1744 | ;} | 1752 | ;} |
| 1745 | break; | 1753 | break; |
| 1746 | 1754 | ||
| 1747 | case 46: | 1755 | case 48: |
| 1748 | 1756 | ||
| 1749 | { (yyval.string) = NULL; ;} | 1757 | { (yyval.string) = NULL; ;} |
| 1750 | break; | 1758 | break; |
| 1751 | 1759 | ||
| 1752 | case 47: | 1760 | case 49: |
| 1753 | 1761 | ||
| 1754 | { (yyval.string) = (yyvsp[(2) - (2)].string); ;} | 1762 | { (yyval.string) = (yyvsp[(2) - (2)].string); ;} |
| 1755 | break; | 1763 | break; |
| 1756 | 1764 | ||
| 1757 | case 48: | 1765 | case 50: |
| 1758 | 1766 | ||
| 1759 | { | 1767 | { |
| 1760 | struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE); | 1768 | struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE); |
| @@ -1765,14 +1773,14 @@ yyreduce: | |||
| 1765 | ;} | 1773 | ;} |
| 1766 | break; | 1774 | break; |
| 1767 | 1775 | ||
| 1768 | case 49: | 1776 | case 51: |
| 1769 | 1777 | ||
| 1770 | { | 1778 | { |
| 1771 | (yyval.menu) = menu_add_menu(); | 1779 | (yyval.menu) = menu_add_menu(); |
| 1772 | ;} | 1780 | ;} |
| 1773 | break; | 1781 | break; |
| 1774 | 1782 | ||
| 1775 | case 50: | 1783 | case 52: |
| 1776 | 1784 | ||
| 1777 | { | 1785 | { |
| 1778 | if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) { | 1786 | if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) { |
| @@ -1782,7 +1790,7 @@ yyreduce: | |||
| 1782 | ;} | 1790 | ;} |
| 1783 | break; | 1791 | break; |
| 1784 | 1792 | ||
| 1785 | case 58: | 1793 | case 60: |
| 1786 | 1794 | ||
| 1787 | { | 1795 | { |
| 1788 | menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); | 1796 | menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); |
| @@ -1790,7 +1798,7 @@ yyreduce: | |||
| 1790 | ;} | 1798 | ;} |
| 1791 | break; | 1799 | break; |
| 1792 | 1800 | ||
| 1793 | case 59: | 1801 | case 61: |
| 1794 | 1802 | ||
| 1795 | { | 1803 | { |
| 1796 | if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) { | 1804 | if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) { |
| @@ -1803,7 +1811,7 @@ yyreduce: | |||
| 1803 | ;} | 1811 | ;} |
| 1804 | break; | 1812 | break; |
| 1805 | 1813 | ||
| 1806 | case 60: | 1814 | case 62: |
| 1807 | 1815 | ||
| 1808 | { | 1816 | { |
| 1809 | current_entry->sym->flags |= SYMBOL_OPTIONAL; | 1817 | current_entry->sym->flags |= SYMBOL_OPTIONAL; |
| @@ -1811,7 +1819,7 @@ yyreduce: | |||
| 1811 | ;} | 1819 | ;} |
| 1812 | break; | 1820 | break; |
| 1813 | 1821 | ||
| 1814 | case 61: | 1822 | case 63: |
| 1815 | 1823 | ||
| 1816 | { | 1824 | { |
| 1817 | if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) { | 1825 | if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) { |
| @@ -1823,7 +1831,7 @@ yyreduce: | |||
| 1823 | ;} | 1831 | ;} |
| 1824 | break; | 1832 | break; |
| 1825 | 1833 | ||
| 1826 | case 64: | 1834 | case 66: |
| 1827 | 1835 | ||
| 1828 | { | 1836 | { |
| 1829 | printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); | 1837 | printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); |
| @@ -1833,7 +1841,7 @@ yyreduce: | |||
| 1833 | ;} | 1841 | ;} |
| 1834 | break; | 1842 | break; |
| 1835 | 1843 | ||
| 1836 | case 65: | 1844 | case 67: |
| 1837 | 1845 | ||
| 1838 | { | 1846 | { |
| 1839 | if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) { | 1847 | if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) { |
| @@ -1843,7 +1851,14 @@ yyreduce: | |||
| 1843 | ;} | 1851 | ;} |
| 1844 | break; | 1852 | break; |
| 1845 | 1853 | ||
| 1846 | case 71: | 1854 | case 73: |
| 1855 | |||
| 1856 | { | ||
| 1857 | menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL); | ||
| 1858 | ;} | ||
| 1859 | break; | ||
| 1860 | |||
| 1861 | case 74: | ||
| 1847 | 1862 | ||
| 1848 | { | 1863 | { |
| 1849 | menu_add_entry(NULL); | 1864 | menu_add_entry(NULL); |
| @@ -1852,14 +1867,14 @@ yyreduce: | |||
| 1852 | ;} | 1867 | ;} |
| 1853 | break; | 1868 | break; |
| 1854 | 1869 | ||
| 1855 | case 72: | 1870 | case 75: |
| 1856 | 1871 | ||
| 1857 | { | 1872 | { |
| 1858 | (yyval.menu) = menu_add_menu(); | 1873 | (yyval.menu) = menu_add_menu(); |
| 1859 | ;} | 1874 | ;} |
| 1860 | break; | 1875 | break; |
| 1861 | 1876 | ||
| 1862 | case 73: | 1877 | case 76: |
| 1863 | 1878 | ||
| 1864 | { | 1879 | { |
| 1865 | if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) { | 1880 | if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) { |
| @@ -1869,7 +1884,7 @@ yyreduce: | |||
| 1869 | ;} | 1884 | ;} |
| 1870 | break; | 1885 | break; |
| 1871 | 1886 | ||
| 1872 | case 79: | 1887 | case 82: |
| 1873 | 1888 | ||
| 1874 | { | 1889 | { |
| 1875 | printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); | 1890 | printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); |
| @@ -1877,7 +1892,7 @@ yyreduce: | |||
| 1877 | ;} | 1892 | ;} |
| 1878 | break; | 1893 | break; |
| 1879 | 1894 | ||
| 1880 | case 80: | 1895 | case 83: |
| 1881 | 1896 | ||
| 1882 | { | 1897 | { |
| 1883 | menu_add_entry(NULL); | 1898 | menu_add_entry(NULL); |
| @@ -1886,14 +1901,14 @@ yyreduce: | |||
| 1886 | ;} | 1901 | ;} |
| 1887 | break; | 1902 | break; |
| 1888 | 1903 | ||
| 1889 | case 81: | 1904 | case 84: |
| 1890 | 1905 | ||
| 1891 | { | 1906 | { |
| 1892 | menu_end_entry(); | 1907 | menu_end_entry(); |
| 1893 | ;} | 1908 | ;} |
| 1894 | break; | 1909 | break; |
| 1895 | 1910 | ||
| 1896 | case 82: | 1911 | case 85: |
| 1897 | 1912 | ||
| 1898 | { | 1913 | { |
| 1899 | printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); | 1914 | printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); |
| @@ -1901,14 +1916,14 @@ yyreduce: | |||
| 1901 | ;} | 1916 | ;} |
| 1902 | break; | 1917 | break; |
| 1903 | 1918 | ||
| 1904 | case 83: | 1919 | case 86: |
| 1905 | 1920 | ||
| 1906 | { | 1921 | { |
| 1907 | current_entry->help = (yyvsp[(2) - (2)].string); | 1922 | current_entry->help = (yyvsp[(2) - (2)].string); |
| 1908 | ;} | 1923 | ;} |
| 1909 | break; | 1924 | break; |
| 1910 | 1925 | ||
| 1911 | case 88: | 1926 | case 91: |
| 1912 | 1927 | ||
| 1913 | { | 1928 | { |
| 1914 | menu_add_dep((yyvsp[(3) - (4)].expr)); | 1929 | menu_add_dep((yyvsp[(3) - (4)].expr)); |
| @@ -1916,84 +1931,84 @@ yyreduce: | |||
| 1916 | ;} | 1931 | ;} |
| 1917 | break; | 1932 | break; |
| 1918 | 1933 | ||
| 1919 | case 90: | 1934 | case 93: |
| 1920 | 1935 | ||
| 1921 | { | 1936 | { |
| 1922 | menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr)); | 1937 | menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr)); |
| 1923 | ;} | 1938 | ;} |
| 1924 | break; | 1939 | break; |
| 1925 | 1940 | ||
| 1926 | case 93: | 1941 | case 96: |
| 1927 | 1942 | ||
| 1928 | { (yyval.id) = (yyvsp[(1) - (2)].id); ;} | 1943 | { (yyval.id) = (yyvsp[(1) - (2)].id); ;} |
| 1929 | break; | 1944 | break; |
| 1930 | 1945 | ||
| 1931 | case 94: | 1946 | case 97: |
| 1932 | 1947 | ||
| 1933 | { (yyval.id) = (yyvsp[(1) - (2)].id); ;} | 1948 | { (yyval.id) = (yyvsp[(1) - (2)].id); ;} |
| 1934 | break; | 1949 | break; |
| 1935 | 1950 | ||
| 1936 | case 95: | 1951 | case 98: |
| 1937 | 1952 | ||
| 1938 | { (yyval.id) = (yyvsp[(1) - (2)].id); ;} | 1953 | { (yyval.id) = (yyvsp[(1) - (2)].id); ;} |
| 1939 | break; | 1954 | break; |
| 1940 | 1955 | ||
| 1941 | case 98: | 1956 | case 101: |
| 1942 | 1957 | ||
| 1943 | { (yyval.expr) = NULL; ;} | 1958 | { (yyval.expr) = NULL; ;} |
| 1944 | break; | 1959 | break; |
| 1945 | 1960 | ||
| 1946 | case 99: | 1961 | case 102: |
| 1947 | 1962 | ||
| 1948 | { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;} | 1963 | { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;} |
| 1949 | break; | 1964 | break; |
| 1950 | 1965 | ||
| 1951 | case 100: | 1966 | case 103: |
| 1952 | 1967 | ||
| 1953 | { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;} | 1968 | { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;} |
| 1954 | break; | 1969 | break; |
| 1955 | 1970 | ||
| 1956 | case 101: | 1971 | case 104: |
| 1957 | 1972 | ||
| 1958 | { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} | 1973 | { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} |
| 1959 | break; | 1974 | break; |
| 1960 | 1975 | ||
| 1961 | case 102: | 1976 | case 105: |
| 1962 | 1977 | ||
| 1963 | { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} | 1978 | { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} |
| 1964 | break; | 1979 | break; |
| 1965 | 1980 | ||
| 1966 | case 103: | 1981 | case 106: |
| 1967 | 1982 | ||
| 1968 | { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} | 1983 | { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} |
| 1969 | break; | 1984 | break; |
| 1970 | 1985 | ||
| 1971 | case 104: | 1986 | case 107: |
| 1972 | 1987 | ||
| 1973 | { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;} | 1988 | { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;} |
| 1974 | break; | 1989 | break; |
| 1975 | 1990 | ||
| 1976 | case 105: | 1991 | case 108: |
| 1977 | 1992 | ||
| 1978 | { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} | 1993 | { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} |
| 1979 | break; | 1994 | break; |
| 1980 | 1995 | ||
| 1981 | case 106: | 1996 | case 109: |
| 1982 | 1997 | ||
| 1983 | { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} | 1998 | { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} |
| 1984 | break; | 1999 | break; |
| 1985 | 2000 | ||
| 1986 | case 107: | 2001 | case 110: |
| 1987 | 2002 | ||
| 1988 | { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;} | 2003 | { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;} |
| 1989 | break; | 2004 | break; |
| 1990 | 2005 | ||
| 1991 | case 108: | 2006 | case 111: |
| 1992 | 2007 | ||
| 1993 | { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); ;} | 2008 | { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); ;} |
| 1994 | break; | 2009 | break; |
| 1995 | 2010 | ||
| 1996 | case 109: | 2011 | case 112: |
| 1997 | 2012 | ||
| 1998 | { (yyval.string) = NULL; ;} | 2013 | { (yyval.string) = NULL; ;} |
| 1999 | break; | 2014 | break; |
| @@ -2239,6 +2254,10 @@ void conf_parse(const char *name) | |||
| 2239 | prop = prop_alloc(P_DEFAULT, modules_sym); | 2254 | prop = prop_alloc(P_DEFAULT, modules_sym); |
| 2240 | prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); | 2255 | prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); |
| 2241 | } | 2256 | } |
| 2257 | |||
| 2258 | rootmenu.prompt->text = _(rootmenu.prompt->text); | ||
| 2259 | rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); | ||
| 2260 | |||
| 2242 | menu_finalize(&rootmenu); | 2261 | menu_finalize(&rootmenu); |
| 2243 | for_all_symbols(i, sym) { | 2262 | for_all_symbols(i, sym) { |
| 2244 | if (sym_check_deps(sym)) | 2263 | if (sym_check_deps(sym)) |
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 23dfd3baa7a1..2abd3c7ff15d 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
| @@ -36,7 +36,7 @@ static struct menu *current_menu, *current_entry; | |||
| 36 | #define YYERROR_VERBOSE | 36 | #define YYERROR_VERBOSE |
| 37 | #endif | 37 | #endif |
| 38 | %} | 38 | %} |
| 39 | %expect 26 | 39 | %expect 28 |
| 40 | 40 | ||
| 41 | %union | 41 | %union |
| 42 | { | 42 | { |
| @@ -104,14 +104,15 @@ static struct menu *current_menu, *current_entry; | |||
| 104 | %} | 104 | %} |
| 105 | 105 | ||
| 106 | %% | 106 | %% |
| 107 | input: stmt_list; | 107 | input: nl start | start; |
| 108 | |||
| 109 | start: mainmenu_stmt stmt_list | stmt_list; | ||
| 108 | 110 | ||
| 109 | stmt_list: | 111 | stmt_list: |
| 110 | /* empty */ | 112 | /* empty */ |
| 111 | | stmt_list common_stmt | 113 | | stmt_list common_stmt |
| 112 | | stmt_list choice_stmt | 114 | | stmt_list choice_stmt |
| 113 | | stmt_list menu_stmt | 115 | | stmt_list menu_stmt |
| 114 | | stmt_list T_MAINMENU prompt nl | ||
| 115 | | stmt_list end { zconf_error("unexpected end statement"); } | 116 | | stmt_list end { zconf_error("unexpected end statement"); } |
| 116 | | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } | 117 | | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } |
| 117 | | stmt_list option_name error T_EOL | 118 | | stmt_list option_name error T_EOL |
| @@ -342,6 +343,13 @@ if_block: | |||
| 342 | | if_block choice_stmt | 343 | | if_block choice_stmt |
| 343 | ; | 344 | ; |
| 344 | 345 | ||
| 346 | /* mainmenu entry */ | ||
| 347 | |||
| 348 | mainmenu_stmt: T_MAINMENU prompt nl | ||
| 349 | { | ||
| 350 | menu_add_prompt(P_MENU, $2, NULL); | ||
| 351 | }; | ||
| 352 | |||
| 345 | /* menu entry */ | 353 | /* menu entry */ |
| 346 | 354 | ||
| 347 | menu: T_MENU prompt T_EOL | 355 | menu: T_MENU prompt T_EOL |
| @@ -494,6 +502,10 @@ void conf_parse(const char *name) | |||
| 494 | prop = prop_alloc(P_DEFAULT, modules_sym); | 502 | prop = prop_alloc(P_DEFAULT, modules_sym); |
| 495 | prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); | 503 | prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); |
| 496 | } | 504 | } |
| 505 | |||
| 506 | rootmenu.prompt->text = _(rootmenu.prompt->text); | ||
| 507 | rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); | ||
| 508 | |||
| 497 | menu_finalize(&rootmenu); | 509 | menu_finalize(&rootmenu); |
| 498 | for_all_symbols(i, sym) { | 510 | for_all_symbols(i, sym) { |
| 499 | if (sym_check_deps(sym)) | 511 | if (sym_check_deps(sym)) |
