diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-17 12:14:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-17 12:14:49 -0500 |
commit | cb20c28a9c41052c2d7220325dae60c16f417ded (patch) | |
tree | fa3d768989b3de7c8c914495c193d67baa51f7ea /scripts | |
parent | a08e37f31aa2800e0c9d20e1fc9283a06901cac2 (diff) | |
parent | 25583d4b5aa2c9aa5ed03ecc2ce73f3922714495 (diff) |
Merge branch 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc
* 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc:
Makefile: Add -Wmising-prototypes to HOSTCFLAGS
oss: Mark loadhex static in hex2hex.c
dtc: Mark various internal functions static
dtc: Set "noinput" in the lexer to avoid an unused function
drm: radeon: Mark several functions static in mkregtable
arch/sparc/boot/*.c: Mark various internal functions static
arch/powerpc/boot/addRamDisk.c: Mark several internal functions static
arch/alpha/boot/tools/objstrip.c: Mark "usage" static
Documentation/vm/page-types.c: Declare checked_open static
genksyms: Mark is_reserved_word static
kconfig: Mark various internal functions static
kconfig: Make zconf.y work with current bison
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/dtc/data.c | 2 | ||||
-rw-r--r-- | scripts/dtc/dtc-lexer.l | 2 | ||||
-rw-r--r-- | scripts/dtc/dtc-lexer.lex.c_shipped | 69 | ||||
-rw-r--r-- | scripts/dtc/libfdt/fdt_ro.c | 2 | ||||
-rw-r--r-- | scripts/dtc/treesource.c | 2 | ||||
-rw-r--r-- | scripts/genksyms/keywords.c_shipped | 95 | ||||
-rw-r--r-- | scripts/genksyms/keywords.gperf | 2 | ||||
-rw-r--r-- | scripts/kconfig/lex.zconf.c_shipped | 25 | ||||
-rw-r--r-- | scripts/kconfig/zconf.gperf | 2 | ||||
-rw-r--r-- | scripts/kconfig/zconf.hash.c_shipped | 2 | ||||
-rw-r--r-- | scripts/kconfig/zconf.l | 6 | ||||
-rw-r--r-- | scripts/kconfig/zconf.tab.c_shipped | 379 | ||||
-rw-r--r-- | scripts/kconfig/zconf.y | 13 |
13 files changed, 315 insertions, 286 deletions
diff --git a/scripts/dtc/data.c b/scripts/dtc/data.c index dd2e3d39d4c1..fe555e819bf8 100644 --- a/scripts/dtc/data.c +++ b/scripts/dtc/data.c | |||
@@ -217,7 +217,7 @@ struct data data_insert_at_marker(struct data d, struct marker *m, | |||
217 | return d; | 217 | return d; |
218 | } | 218 | } |
219 | 219 | ||
220 | struct data data_append_markers(struct data d, struct marker *m) | 220 | static struct data data_append_markers(struct data d, struct marker *m) |
221 | { | 221 | { |
222 | struct marker **mp = &d.markers; | 222 | struct marker **mp = &d.markers; |
223 | 223 | ||
diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l index 44dbfd3f0976..a627bbee91d4 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l | |||
@@ -18,7 +18,7 @@ | |||
18 | * USA | 18 | * USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | %option noyywrap nounput yylineno | 21 | %option noyywrap noinput nounput yylineno |
22 | 22 | ||
23 | %x INCLUDE | 23 | %x INCLUDE |
24 | %x BYTESTRING | 24 | %x BYTESTRING |
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped index ac392cb040f6..e27cc636e326 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped | |||
@@ -9,7 +9,7 @@ | |||
9 | #define FLEX_SCANNER | 9 | #define FLEX_SCANNER |
10 | #define YY_FLEX_MAJOR_VERSION 2 | 10 | #define YY_FLEX_MAJOR_VERSION 2 |
11 | #define YY_FLEX_MINOR_VERSION 5 | 11 | #define YY_FLEX_MINOR_VERSION 5 |
12 | #define YY_FLEX_SUBMINOR_VERSION 34 | 12 | #define YY_FLEX_SUBMINOR_VERSION 35 |
13 | #if YY_FLEX_SUBMINOR_VERSION > 0 | 13 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
14 | #define FLEX_BETA | 14 | #define FLEX_BETA |
15 | #endif | 15 | #endif |
@@ -54,7 +54,6 @@ typedef int flex_int32_t; | |||
54 | typedef unsigned char flex_uint8_t; | 54 | typedef unsigned char flex_uint8_t; |
55 | typedef unsigned short int flex_uint16_t; | 55 | typedef unsigned short int flex_uint16_t; |
56 | typedef unsigned int flex_uint32_t; | 56 | typedef unsigned int flex_uint32_t; |
57 | #endif /* ! C99 */ | ||
58 | 57 | ||
59 | /* Limits of integral types. */ | 58 | /* Limits of integral types. */ |
60 | #ifndef INT8_MIN | 59 | #ifndef INT8_MIN |
@@ -85,6 +84,8 @@ typedef unsigned int flex_uint32_t; | |||
85 | #define UINT32_MAX (4294967295U) | 84 | #define UINT32_MAX (4294967295U) |
86 | #endif | 85 | #endif |
87 | 86 | ||
87 | #endif /* ! C99 */ | ||
88 | |||
88 | #endif /* ! FLEXINT_H */ | 89 | #endif /* ! FLEXINT_H */ |
89 | 90 | ||
90 | #ifdef __cplusplus | 91 | #ifdef __cplusplus |
@@ -141,7 +142,15 @@ typedef unsigned int flex_uint32_t; | |||
141 | 142 | ||
142 | /* Size of default input buffer. */ | 143 | /* Size of default input buffer. */ |
143 | #ifndef YY_BUF_SIZE | 144 | #ifndef YY_BUF_SIZE |
145 | #ifdef __ia64__ | ||
146 | /* On IA-64, the buffer size is 16k, not 8k. | ||
147 | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. | ||
148 | * Ditto for the __ia64__ case accordingly. | ||
149 | */ | ||
150 | #define YY_BUF_SIZE 32768 | ||
151 | #else | ||
144 | #define YY_BUF_SIZE 16384 | 152 | #define YY_BUF_SIZE 16384 |
153 | #endif /* __ia64__ */ | ||
145 | #endif | 154 | #endif |
146 | 155 | ||
147 | /* The state buf must be large enough to hold one state per character in the main buffer. | 156 | /* The state buf must be large enough to hold one state per character in the main buffer. |
@@ -192,13 +201,6 @@ extern FILE *yyin, *yyout; | |||
192 | 201 | ||
193 | #define unput(c) yyunput( c, (yytext_ptr) ) | 202 | #define unput(c) yyunput( c, (yytext_ptr) ) |
194 | 203 | ||
195 | /* The following is because we cannot portably get our hands on size_t | ||
196 | * (without autoconf's help, which isn't available because we want | ||
197 | * flex-generated scanners to compile on their own). | ||
198 | * Given that the standard has decreed that size_t exists since 1989, | ||
199 | * I guess we can afford to depend on it. Manoj. | ||
200 | */ | ||
201 | |||
202 | #ifndef YY_TYPEDEF_YY_SIZE_T | 204 | #ifndef YY_TYPEDEF_YY_SIZE_T |
203 | #define YY_TYPEDEF_YY_SIZE_T | 205 | #define YY_TYPEDEF_YY_SIZE_T |
204 | typedef size_t yy_size_t; | 206 | typedef size_t yy_size_t; |
@@ -604,6 +606,7 @@ char *yytext; | |||
604 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | 606 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
605 | * USA | 607 | * USA |
606 | */ | 608 | */ |
609 | #define YY_NO_INPUT 1 | ||
607 | 610 | ||
608 | 611 | ||
609 | 612 | ||
@@ -634,7 +637,7 @@ static int dts_version; /* = 0 */ | |||
634 | 637 | ||
635 | static void push_input_file(const char *filename); | 638 | static void push_input_file(const char *filename); |
636 | static int pop_input_file(void); | 639 | static int pop_input_file(void); |
637 | #line 638 "dtc-lexer.lex.c" | 640 | #line 641 "dtc-lexer.lex.c" |
638 | 641 | ||
639 | #define INITIAL 0 | 642 | #define INITIAL 0 |
640 | #define INCLUDE 1 | 643 | #define INCLUDE 1 |
@@ -656,6 +659,35 @@ static int pop_input_file(void); | |||
656 | 659 | ||
657 | static int yy_init_globals (void ); | 660 | static int yy_init_globals (void ); |
658 | 661 | ||
662 | /* Accessor methods to globals. | ||
663 | These are made visible to non-reentrant scanners for convenience. */ | ||
664 | |||
665 | int yylex_destroy (void ); | ||
666 | |||
667 | int yyget_debug (void ); | ||
668 | |||
669 | void yyset_debug (int debug_flag ); | ||
670 | |||
671 | YY_EXTRA_TYPE yyget_extra (void ); | ||
672 | |||
673 | void yyset_extra (YY_EXTRA_TYPE user_defined ); | ||
674 | |||
675 | FILE *yyget_in (void ); | ||
676 | |||
677 | void yyset_in (FILE * in_str ); | ||
678 | |||
679 | FILE *yyget_out (void ); | ||
680 | |||
681 | void yyset_out (FILE * out_str ); | ||
682 | |||
683 | int yyget_leng (void ); | ||
684 | |||
685 | char *yyget_text (void ); | ||
686 | |||
687 | int yyget_lineno (void ); | ||
688 | |||
689 | void yyset_lineno (int line_number ); | ||
690 | |||
659 | /* Macros after this point can all be overridden by user definitions in | 691 | /* Macros after this point can all be overridden by user definitions in |
660 | * section 1. | 692 | * section 1. |
661 | */ | 693 | */ |
@@ -688,7 +720,12 @@ static int input (void ); | |||
688 | 720 | ||
689 | /* Amount of stuff to slurp up with each read. */ | 721 | /* Amount of stuff to slurp up with each read. */ |
690 | #ifndef YY_READ_BUF_SIZE | 722 | #ifndef YY_READ_BUF_SIZE |
723 | #ifdef __ia64__ | ||
724 | /* On IA-64, the buffer size is 16k, not 8k */ | ||
725 | #define YY_READ_BUF_SIZE 16384 | ||
726 | #else | ||
691 | #define YY_READ_BUF_SIZE 8192 | 727 | #define YY_READ_BUF_SIZE 8192 |
728 | #endif /* __ia64__ */ | ||
692 | #endif | 729 | #endif |
693 | 730 | ||
694 | /* Copy whatever the last rule matched to the standard output. */ | 731 | /* Copy whatever the last rule matched to the standard output. */ |
@@ -696,7 +733,7 @@ static int input (void ); | |||
696 | /* This used to be an fputs(), but since the string might contain NUL's, | 733 | /* This used to be an fputs(), but since the string might contain NUL's, |
697 | * we now use fwrite(). | 734 | * we now use fwrite(). |
698 | */ | 735 | */ |
699 | #define ECHO fwrite( yytext, yyleng, 1, yyout ) | 736 | #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) |
700 | #endif | 737 | #endif |
701 | 738 | ||
702 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | 739 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
@@ -707,7 +744,7 @@ static int input (void ); | |||
707 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ | 744 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
708 | { \ | 745 | { \ |
709 | int c = '*'; \ | 746 | int c = '*'; \ |
710 | int n; \ | 747 | size_t n; \ |
711 | for ( n = 0; n < max_size && \ | 748 | for ( n = 0; n < max_size && \ |
712 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ | 749 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
713 | buf[n] = (char) c; \ | 750 | buf[n] = (char) c; \ |
@@ -791,7 +828,7 @@ YY_DECL | |||
791 | 828 | ||
792 | #line 64 "dtc-lexer.l" | 829 | #line 64 "dtc-lexer.l" |
793 | 830 | ||
794 | #line 795 "dtc-lexer.lex.c" | 831 | #line 832 "dtc-lexer.lex.c" |
795 | 832 | ||
796 | if ( !(yy_init) ) | 833 | if ( !(yy_init) ) |
797 | { | 834 | { |
@@ -1116,7 +1153,7 @@ YY_RULE_SETUP | |||
1116 | #line 222 "dtc-lexer.l" | 1153 | #line 222 "dtc-lexer.l" |
1117 | ECHO; | 1154 | ECHO; |
1118 | YY_BREAK | 1155 | YY_BREAK |
1119 | #line 1120 "dtc-lexer.lex.c" | 1156 | #line 1157 "dtc-lexer.lex.c" |
1120 | 1157 | ||
1121 | case YY_END_OF_BUFFER: | 1158 | case YY_END_OF_BUFFER: |
1122 | { | 1159 | { |
@@ -1840,8 +1877,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) | |||
1840 | 1877 | ||
1841 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will | 1878 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
1842 | * scan from a @e copy of @a bytes. | 1879 | * scan from a @e copy of @a bytes. |
1843 | * @param bytes the byte buffer to scan | 1880 | * @param yybytes the byte buffer to scan |
1844 | * @param len the number of bytes in the buffer pointed to by @a bytes. | 1881 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
1845 | * | 1882 | * |
1846 | * @return the newly allocated buffer state object. | 1883 | * @return the newly allocated buffer state object. |
1847 | */ | 1884 | */ |
diff --git a/scripts/dtc/libfdt/fdt_ro.c b/scripts/dtc/libfdt/fdt_ro.c index fbbba44fcd0d..22e692919ff9 100644 --- a/scripts/dtc/libfdt/fdt_ro.c +++ b/scripts/dtc/libfdt/fdt_ro.c | |||
@@ -411,7 +411,7 @@ int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle) | |||
411 | &phandle, sizeof(phandle)); | 411 | &phandle, sizeof(phandle)); |
412 | } | 412 | } |
413 | 413 | ||
414 | int _stringlist_contains(const char *strlist, int listlen, const char *str) | 414 | static int _stringlist_contains(const char *strlist, int listlen, const char *str) |
415 | { | 415 | { |
416 | int len = strlen(str); | 416 | int len = strlen(str); |
417 | const char *p; | 417 | const char *p; |
diff --git a/scripts/dtc/treesource.c b/scripts/dtc/treesource.c index ebeb6eb27907..1521ff11bb97 100644 --- a/scripts/dtc/treesource.c +++ b/scripts/dtc/treesource.c | |||
@@ -52,7 +52,7 @@ static void write_prefix(FILE *f, int level) | |||
52 | fputc('\t', f); | 52 | fputc('\t', f); |
53 | } | 53 | } |
54 | 54 | ||
55 | int isstring(char c) | 55 | static int isstring(char c) |
56 | { | 56 | { |
57 | return (isprint(c) | 57 | return (isprint(c) |
58 | || (c == '\0') | 58 | || (c == '\0') |
diff --git a/scripts/genksyms/keywords.c_shipped b/scripts/genksyms/keywords.c_shipped index 971e0113ae7a..287467a2e8c7 100644 --- a/scripts/genksyms/keywords.c_shipped +++ b/scripts/genksyms/keywords.c_shipped | |||
@@ -1,4 +1,4 @@ | |||
1 | /* ANSI-C code produced by gperf version 3.0.2 */ | 1 | /* ANSI-C code produced by gperf version 3.0.3 */ |
2 | /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ | 2 | /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ |
3 | 3 | ||
4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ | 4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ |
@@ -30,7 +30,9 @@ | |||
30 | 30 | ||
31 | #line 1 "scripts/genksyms/keywords.gperf" | 31 | #line 1 "scripts/genksyms/keywords.gperf" |
32 | 32 | ||
33 | #line 3 "scripts/genksyms/keywords.gperf" | 33 | struct resword; |
34 | static const struct resword *is_reserved_word(register const char *str, register unsigned int len); | ||
35 | #line 5 "scripts/genksyms/keywords.gperf" | ||
34 | struct resword { const char *name; int token; }; | 36 | struct resword { const char *name; int token; }; |
35 | /* maximum key range = 62, duplicates = 0 */ | 37 | /* maximum key range = 62, duplicates = 0 */ |
36 | 38 | ||
@@ -78,6 +80,9 @@ is_reserved_hash (register const char *str, register unsigned int len) | |||
78 | 80 | ||
79 | #ifdef __GNUC__ | 81 | #ifdef __GNUC__ |
80 | __inline | 82 | __inline |
83 | #ifdef __GNUC_STDC_INLINE__ | ||
84 | __attribute__ ((__gnu_inline__)) | ||
85 | #endif | ||
81 | #endif | 86 | #endif |
82 | const struct resword * | 87 | const struct resword * |
83 | is_reserved_word (register const char *str, register unsigned int len) | 88 | is_reserved_word (register const char *str, register unsigned int len) |
@@ -94,105 +99,105 @@ is_reserved_word (register const char *str, register unsigned int len) | |||
94 | static const struct resword wordlist[] = | 99 | static const struct resword wordlist[] = |
95 | { | 100 | { |
96 | {""}, {""}, {""}, | 101 | {""}, {""}, {""}, |
97 | #line 26 "scripts/genksyms/keywords.gperf" | 102 | #line 28 "scripts/genksyms/keywords.gperf" |
98 | {"asm", ASM_KEYW}, | 103 | {"asm", ASM_KEYW}, |
99 | {""}, | 104 | {""}, |
100 | #line 8 "scripts/genksyms/keywords.gperf" | 105 | #line 10 "scripts/genksyms/keywords.gperf" |
101 | {"__asm", ASM_KEYW}, | 106 | {"__asm", ASM_KEYW}, |
102 | {""}, | 107 | {""}, |
103 | #line 9 "scripts/genksyms/keywords.gperf" | 108 | #line 11 "scripts/genksyms/keywords.gperf" |
104 | {"__asm__", ASM_KEYW}, | 109 | {"__asm__", ASM_KEYW}, |
105 | {""}, {""}, | 110 | {""}, {""}, |
106 | #line 52 "scripts/genksyms/keywords.gperf" | 111 | #line 54 "scripts/genksyms/keywords.gperf" |
107 | {"__typeof__", TYPEOF_KEYW}, | 112 | {"__typeof__", TYPEOF_KEYW}, |
108 | {""}, | 113 | {""}, |
109 | #line 12 "scripts/genksyms/keywords.gperf" | 114 | #line 14 "scripts/genksyms/keywords.gperf" |
110 | {"__const", CONST_KEYW}, | 115 | {"__const", CONST_KEYW}, |
111 | #line 11 "scripts/genksyms/keywords.gperf" | ||
112 | {"__attribute__", ATTRIBUTE_KEYW}, | ||
113 | #line 13 "scripts/genksyms/keywords.gperf" | 116 | #line 13 "scripts/genksyms/keywords.gperf" |
117 | {"__attribute__", ATTRIBUTE_KEYW}, | ||
118 | #line 15 "scripts/genksyms/keywords.gperf" | ||
114 | {"__const__", CONST_KEYW}, | 119 | {"__const__", CONST_KEYW}, |
115 | #line 18 "scripts/genksyms/keywords.gperf" | 120 | #line 20 "scripts/genksyms/keywords.gperf" |
116 | {"__signed__", SIGNED_KEYW}, | 121 | {"__signed__", SIGNED_KEYW}, |
117 | #line 44 "scripts/genksyms/keywords.gperf" | 122 | #line 46 "scripts/genksyms/keywords.gperf" |
118 | {"static", STATIC_KEYW}, | 123 | {"static", STATIC_KEYW}, |
119 | #line 20 "scripts/genksyms/keywords.gperf" | 124 | #line 22 "scripts/genksyms/keywords.gperf" |
120 | {"__volatile__", VOLATILE_KEYW}, | 125 | {"__volatile__", VOLATILE_KEYW}, |
121 | #line 39 "scripts/genksyms/keywords.gperf" | 126 | #line 41 "scripts/genksyms/keywords.gperf" |
122 | {"int", INT_KEYW}, | 127 | {"int", INT_KEYW}, |
123 | #line 32 "scripts/genksyms/keywords.gperf" | 128 | #line 34 "scripts/genksyms/keywords.gperf" |
124 | {"char", CHAR_KEYW}, | 129 | {"char", CHAR_KEYW}, |
125 | #line 33 "scripts/genksyms/keywords.gperf" | 130 | #line 35 "scripts/genksyms/keywords.gperf" |
126 | {"const", CONST_KEYW}, | 131 | {"const", CONST_KEYW}, |
127 | #line 45 "scripts/genksyms/keywords.gperf" | 132 | #line 47 "scripts/genksyms/keywords.gperf" |
128 | {"struct", STRUCT_KEYW}, | 133 | {"struct", STRUCT_KEYW}, |
129 | #line 24 "scripts/genksyms/keywords.gperf" | 134 | #line 26 "scripts/genksyms/keywords.gperf" |
130 | {"__restrict__", RESTRICT_KEYW}, | 135 | {"__restrict__", RESTRICT_KEYW}, |
131 | #line 25 "scripts/genksyms/keywords.gperf" | 136 | #line 27 "scripts/genksyms/keywords.gperf" |
132 | {"restrict", RESTRICT_KEYW}, | 137 | {"restrict", RESTRICT_KEYW}, |
133 | #line 23 "scripts/genksyms/keywords.gperf" | 138 | #line 25 "scripts/genksyms/keywords.gperf" |
134 | {"_restrict", RESTRICT_KEYW}, | 139 | {"_restrict", RESTRICT_KEYW}, |
135 | #line 16 "scripts/genksyms/keywords.gperf" | 140 | #line 18 "scripts/genksyms/keywords.gperf" |
136 | {"__inline__", INLINE_KEYW}, | 141 | {"__inline__", INLINE_KEYW}, |
137 | #line 10 "scripts/genksyms/keywords.gperf" | 142 | #line 12 "scripts/genksyms/keywords.gperf" |
138 | {"__attribute", ATTRIBUTE_KEYW}, | 143 | {"__attribute", ATTRIBUTE_KEYW}, |
139 | {""}, | 144 | {""}, |
140 | #line 14 "scripts/genksyms/keywords.gperf" | 145 | #line 16 "scripts/genksyms/keywords.gperf" |
141 | {"__extension__", EXTENSION_KEYW}, | 146 | {"__extension__", EXTENSION_KEYW}, |
142 | #line 35 "scripts/genksyms/keywords.gperf" | 147 | #line 37 "scripts/genksyms/keywords.gperf" |
143 | {"enum", ENUM_KEYW}, | 148 | {"enum", ENUM_KEYW}, |
144 | #line 19 "scripts/genksyms/keywords.gperf" | 149 | #line 21 "scripts/genksyms/keywords.gperf" |
145 | {"__volatile", VOLATILE_KEYW}, | 150 | {"__volatile", VOLATILE_KEYW}, |
146 | #line 36 "scripts/genksyms/keywords.gperf" | 151 | #line 38 "scripts/genksyms/keywords.gperf" |
147 | {"extern", EXTERN_KEYW}, | 152 | {"extern", EXTERN_KEYW}, |
148 | {""}, | 153 | {""}, |
149 | #line 17 "scripts/genksyms/keywords.gperf" | 154 | #line 19 "scripts/genksyms/keywords.gperf" |
150 | {"__signed", SIGNED_KEYW}, | 155 | {"__signed", SIGNED_KEYW}, |
151 | #line 7 "scripts/genksyms/keywords.gperf" | 156 | #line 9 "scripts/genksyms/keywords.gperf" |
152 | {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, | 157 | {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, |
153 | {""}, | 158 | {""}, |
154 | #line 51 "scripts/genksyms/keywords.gperf" | 159 | #line 53 "scripts/genksyms/keywords.gperf" |
155 | {"typeof", TYPEOF_KEYW}, | 160 | {"typeof", TYPEOF_KEYW}, |
156 | #line 46 "scripts/genksyms/keywords.gperf" | 161 | #line 48 "scripts/genksyms/keywords.gperf" |
157 | {"typedef", TYPEDEF_KEYW}, | 162 | {"typedef", TYPEDEF_KEYW}, |
158 | #line 15 "scripts/genksyms/keywords.gperf" | 163 | #line 17 "scripts/genksyms/keywords.gperf" |
159 | {"__inline", INLINE_KEYW}, | 164 | {"__inline", INLINE_KEYW}, |
160 | #line 31 "scripts/genksyms/keywords.gperf" | 165 | #line 33 "scripts/genksyms/keywords.gperf" |
161 | {"auto", AUTO_KEYW}, | 166 | {"auto", AUTO_KEYW}, |
162 | #line 47 "scripts/genksyms/keywords.gperf" | 167 | #line 49 "scripts/genksyms/keywords.gperf" |
163 | {"union", UNION_KEYW}, | 168 | {"union", UNION_KEYW}, |
164 | {""}, {""}, | 169 | {""}, {""}, |
165 | #line 48 "scripts/genksyms/keywords.gperf" | 170 | #line 50 "scripts/genksyms/keywords.gperf" |
166 | {"unsigned", UNSIGNED_KEYW}, | 171 | {"unsigned", UNSIGNED_KEYW}, |
167 | #line 49 "scripts/genksyms/keywords.gperf" | 172 | #line 51 "scripts/genksyms/keywords.gperf" |
168 | {"void", VOID_KEYW}, | 173 | {"void", VOID_KEYW}, |
169 | #line 42 "scripts/genksyms/keywords.gperf" | 174 | #line 44 "scripts/genksyms/keywords.gperf" |
170 | {"short", SHORT_KEYW}, | 175 | {"short", SHORT_KEYW}, |
171 | {""}, {""}, | 176 | {""}, {""}, |
172 | #line 50 "scripts/genksyms/keywords.gperf" | 177 | #line 52 "scripts/genksyms/keywords.gperf" |
173 | {"volatile", VOLATILE_KEYW}, | 178 | {"volatile", VOLATILE_KEYW}, |
174 | {""}, | 179 | {""}, |
175 | #line 37 "scripts/genksyms/keywords.gperf" | 180 | #line 39 "scripts/genksyms/keywords.gperf" |
176 | {"float", FLOAT_KEYW}, | 181 | {"float", FLOAT_KEYW}, |
177 | #line 34 "scripts/genksyms/keywords.gperf" | 182 | #line 36 "scripts/genksyms/keywords.gperf" |
178 | {"double", DOUBLE_KEYW}, | 183 | {"double", DOUBLE_KEYW}, |
179 | {""}, | 184 | {""}, |
180 | #line 5 "scripts/genksyms/keywords.gperf" | 185 | #line 7 "scripts/genksyms/keywords.gperf" |
181 | {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, | 186 | {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, |
182 | {""}, {""}, | 187 | {""}, {""}, |
183 | #line 38 "scripts/genksyms/keywords.gperf" | 188 | #line 40 "scripts/genksyms/keywords.gperf" |
184 | {"inline", INLINE_KEYW}, | 189 | {"inline", INLINE_KEYW}, |
185 | #line 6 "scripts/genksyms/keywords.gperf" | 190 | #line 8 "scripts/genksyms/keywords.gperf" |
186 | {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, | 191 | {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, |
187 | #line 41 "scripts/genksyms/keywords.gperf" | 192 | #line 43 "scripts/genksyms/keywords.gperf" |
188 | {"register", REGISTER_KEYW}, | 193 | {"register", REGISTER_KEYW}, |
189 | {""}, | 194 | {""}, |
190 | #line 22 "scripts/genksyms/keywords.gperf" | 195 | #line 24 "scripts/genksyms/keywords.gperf" |
191 | {"_Bool", BOOL_KEYW}, | 196 | {"_Bool", BOOL_KEYW}, |
192 | #line 43 "scripts/genksyms/keywords.gperf" | 197 | #line 45 "scripts/genksyms/keywords.gperf" |
193 | {"signed", SIGNED_KEYW}, | 198 | {"signed", SIGNED_KEYW}, |
194 | {""}, {""}, | 199 | {""}, {""}, |
195 | #line 40 "scripts/genksyms/keywords.gperf" | 200 | #line 42 "scripts/genksyms/keywords.gperf" |
196 | {"long", LONG_KEYW} | 201 | {"long", LONG_KEYW} |
197 | }; | 202 | }; |
198 | 203 | ||
diff --git a/scripts/genksyms/keywords.gperf b/scripts/genksyms/keywords.gperf index 5ef3733225fb..8fe977a4d57b 100644 --- a/scripts/genksyms/keywords.gperf +++ b/scripts/genksyms/keywords.gperf | |||
@@ -1,4 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | struct resword; | ||
3 | static const struct resword *is_reserved_word(register const char *str, register unsigned int len); | ||
2 | %} | 4 | %} |
3 | struct resword { const char *name; int token; } | 5 | struct resword { const char *name; int token; } |
4 | %% | 6 | %% |
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index dc3e81807d13..fdc7113b08d1 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped | |||
@@ -160,7 +160,15 @@ typedef unsigned int flex_uint32_t; | |||
160 | 160 | ||
161 | /* Size of default input buffer. */ | 161 | /* Size of default input buffer. */ |
162 | #ifndef YY_BUF_SIZE | 162 | #ifndef YY_BUF_SIZE |
163 | #ifdef __ia64__ | ||
164 | /* On IA-64, the buffer size is 16k, not 8k. | ||
165 | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. | ||
166 | * Ditto for the __ia64__ case accordingly. | ||
167 | */ | ||
168 | #define YY_BUF_SIZE 32768 | ||
169 | #else | ||
163 | #define YY_BUF_SIZE 16384 | 170 | #define YY_BUF_SIZE 16384 |
171 | #endif /* __ia64__ */ | ||
164 | #endif | 172 | #endif |
165 | 173 | ||
166 | /* The state buf must be large enough to hold one state per character in the main buffer. | 174 | /* The state buf must be large enough to hold one state per character in the main buffer. |
@@ -802,7 +810,7 @@ static int last_ts, first_ts; | |||
802 | static void zconf_endhelp(void); | 810 | static void zconf_endhelp(void); |
803 | static void zconf_endfile(void); | 811 | static void zconf_endfile(void); |
804 | 812 | ||
805 | void new_string(void) | 813 | static void new_string(void) |
806 | { | 814 | { |
807 | text = malloc(START_STRSIZE); | 815 | text = malloc(START_STRSIZE); |
808 | text_asize = START_STRSIZE; | 816 | text_asize = START_STRSIZE; |
@@ -810,7 +818,7 @@ void new_string(void) | |||
810 | *text = 0; | 818 | *text = 0; |
811 | } | 819 | } |
812 | 820 | ||
813 | void append_string(const char *str, int size) | 821 | static void append_string(const char *str, int size) |
814 | { | 822 | { |
815 | int new_size = text_size + size + 1; | 823 | int new_size = text_size + size + 1; |
816 | if (new_size > text_asize) { | 824 | if (new_size > text_asize) { |
@@ -824,7 +832,7 @@ void append_string(const char *str, int size) | |||
824 | text[text_size] = 0; | 832 | text[text_size] = 0; |
825 | } | 833 | } |
826 | 834 | ||
827 | void alloc_string(const char *str, int size) | 835 | static void alloc_string(const char *str, int size) |
828 | { | 836 | { |
829 | text = malloc(size + 1); | 837 | text = malloc(size + 1); |
830 | memcpy(text, str, size); | 838 | memcpy(text, str, size); |
@@ -914,7 +922,12 @@ static int input (void ); | |||
914 | 922 | ||
915 | /* Amount of stuff to slurp up with each read. */ | 923 | /* Amount of stuff to slurp up with each read. */ |
916 | #ifndef YY_READ_BUF_SIZE | 924 | #ifndef YY_READ_BUF_SIZE |
925 | #ifdef __ia64__ | ||
926 | /* On IA-64, the buffer size is 16k, not 8k */ | ||
927 | #define YY_READ_BUF_SIZE 16384 | ||
928 | #else | ||
917 | #define YY_READ_BUF_SIZE 8192 | 929 | #define YY_READ_BUF_SIZE 8192 |
930 | #endif /* __ia64__ */ | ||
918 | #endif | 931 | #endif |
919 | 932 | ||
920 | /* Copy whatever the last rule matched to the standard output. */ | 933 | /* Copy whatever the last rule matched to the standard output. */ |
@@ -922,7 +935,7 @@ static int input (void ); | |||
922 | /* This used to be an fputs(), but since the string might contain NUL's, | 935 | /* This used to be an fputs(), but since the string might contain NUL's, |
923 | * we now use fwrite(). | 936 | * we now use fwrite(). |
924 | */ | 937 | */ |
925 | #define ECHO fwrite( zconftext, zconfleng, 1, zconfout ) | 938 | #define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0) |
926 | #endif | 939 | #endif |
927 | 940 | ||
928 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | 941 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
@@ -2060,8 +2073,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) | |||
2060 | 2073 | ||
2061 | /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will | 2074 | /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will |
2062 | * scan from a @e copy of @a bytes. | 2075 | * scan from a @e copy of @a bytes. |
2063 | * @param bytes the byte buffer to scan | 2076 | * @param yybytes the byte buffer to scan |
2064 | * @param len the number of bytes in the buffer pointed to by @a bytes. | 2077 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
2065 | * | 2078 | * |
2066 | * @return the newly allocated buffer state object. | 2079 | * @return the newly allocated buffer state object. |
2067 | */ | 2080 | */ |
diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf index 25ef5d01c0af..d8bc74249622 100644 --- a/scripts/kconfig/zconf.gperf +++ b/scripts/kconfig/zconf.gperf | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | struct kconf_id; | 10 | struct kconf_id; |
11 | 11 | ||
12 | static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); | ||
13 | |||
12 | %% | 14 | %% |
13 | mainmenu, T_MAINMENU, TF_COMMAND | 15 | mainmenu, T_MAINMENU, TF_COMMAND |
14 | menu, T_MENU, TF_COMMAND | 16 | menu, T_MENU, TF_COMMAND |
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped index 5c73d51339d8..c1748faf4634 100644 --- a/scripts/kconfig/zconf.hash.c_shipped +++ b/scripts/kconfig/zconf.hash.c_shipped | |||
@@ -30,6 +30,8 @@ | |||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | struct kconf_id; | 32 | struct kconf_id; |
33 | |||
34 | static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); | ||
33 | /* maximum key range = 47, duplicates = 0 */ | 35 | /* maximum key range = 47, duplicates = 0 */ |
34 | 36 | ||
35 | #ifdef __GNUC__ | 37 | #ifdef __GNUC__ |
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 21ff69c9ad4e..d8f7236cb0a3 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
@@ -39,7 +39,7 @@ static int last_ts, first_ts; | |||
39 | static void zconf_endhelp(void); | 39 | static void zconf_endhelp(void); |
40 | static void zconf_endfile(void); | 40 | static void zconf_endfile(void); |
41 | 41 | ||
42 | void new_string(void) | 42 | static void new_string(void) |
43 | { | 43 | { |
44 | text = malloc(START_STRSIZE); | 44 | text = malloc(START_STRSIZE); |
45 | text_asize = START_STRSIZE; | 45 | text_asize = START_STRSIZE; |
@@ -47,7 +47,7 @@ void new_string(void) | |||
47 | *text = 0; | 47 | *text = 0; |
48 | } | 48 | } |
49 | 49 | ||
50 | void append_string(const char *str, int size) | 50 | static void append_string(const char *str, int size) |
51 | { | 51 | { |
52 | int new_size = text_size + size + 1; | 52 | int new_size = text_size + size + 1; |
53 | if (new_size > text_asize) { | 53 | if (new_size > text_asize) { |
@@ -61,7 +61,7 @@ void append_string(const char *str, int size) | |||
61 | text[text_size] = 0; | 61 | text[text_size] = 0; |
62 | } | 62 | } |
63 | 63 | ||
64 | void alloc_string(const char *str, int size) | 64 | static void alloc_string(const char *str, int size) |
65 | { | 65 | { |
66 | text = malloc(size + 1); | 66 | text = malloc(size + 1); |
67 | memcpy(text, str, size); | 67 | memcpy(text, str, size); |
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index 95df833b5a9d..6e9dcd59aa87 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped | |||
@@ -1,24 +1,23 @@ | |||
1 | /* A Bison parser, made by GNU Bison 2.3. */ | ||
2 | 1 | ||
3 | /* Skeleton implementation for Bison's Yacc-like parsers in C | 2 | /* A Bison parser, made by GNU Bison 2.4.1. */ |
4 | 3 | ||
5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | 4 | /* Skeleton implementation for Bison's Yacc-like parsers in C |
5 | |||
6 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | ||
6 | Free Software Foundation, Inc. | 7 | Free Software Foundation, Inc. |
7 | 8 | ||
8 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software: you can redistribute it and/or modify |
9 | it under the terms of the GNU General Public License as published by | 10 | it under the terms of the GNU General Public License as published by |
10 | the Free Software Foundation; either version 2, or (at your option) | 11 | the Free Software Foundation, either version 3 of the License, or |
11 | any later version. | 12 | (at your option) any later version. |
12 | 13 | ||
13 | This program is distributed in the hope that it will be useful, | 14 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. | 17 | GNU General Public License for more details. |
17 | 18 | ||
18 | You should have received a copy of the GNU General Public License | 19 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
21 | Boston, MA 02110-1301, USA. */ | ||
22 | 21 | ||
23 | /* As a special exception, you may create a larger work that contains | 22 | /* As a special exception, you may create a larger work that contains |
24 | part or all of the Bison parser skeleton and distribute that work | 23 | part or all of the Bison parser skeleton and distribute that work |
@@ -29,7 +28,7 @@ | |||
29 | special exception, which will cause the skeleton and the resulting | 28 | special exception, which will cause the skeleton and the resulting |
30 | Bison output files to be licensed under the GNU General Public | 29 | Bison output files to be licensed under the GNU General Public |
31 | License without this special exception. | 30 | License without this special exception. |
32 | 31 | ||
33 | This special exception was added by the Free Software Foundation in | 32 | This special exception was added by the Free Software Foundation in |
34 | version 2.2 of Bison. */ | 33 | version 2.2 of Bison. */ |
35 | 34 | ||
@@ -47,7 +46,7 @@ | |||
47 | #define YYBISON 1 | 46 | #define YYBISON 1 |
48 | 47 | ||
49 | /* Bison version. */ | 48 | /* Bison version. */ |
50 | #define YYBISON_VERSION "2.3" | 49 | #define YYBISON_VERSION "2.4.1" |
51 | 50 | ||
52 | /* Skeleton name. */ | 51 | /* Skeleton name. */ |
53 | #define YYSKELETON_NAME "yacc.c" | 52 | #define YYSKELETON_NAME "yacc.c" |
@@ -55,94 +54,23 @@ | |||
55 | /* Pure parsers. */ | 54 | /* Pure parsers. */ |
56 | #define YYPURE 0 | 55 | #define YYPURE 0 |
57 | 56 | ||
57 | /* Push parsers. */ | ||
58 | #define YYPUSH 0 | ||
59 | |||
60 | /* Pull parsers. */ | ||
61 | #define YYPULL 1 | ||
62 | |||
58 | /* Using locations. */ | 63 | /* Using locations. */ |
59 | #define YYLSP_NEEDED 0 | 64 | #define YYLSP_NEEDED 0 |
60 | 65 | ||
61 | /* Substitute the variable and function names. */ | 66 | /* Substitute the variable and function names. */ |
62 | #define yyparse zconfparse | 67 | #define yyparse zconfparse |
63 | #define yylex zconflex | 68 | #define yylex zconflex |
64 | #define yyerror zconferror | 69 | #define yyerror zconferror |
65 | #define yylval zconflval | 70 | #define yylval zconflval |
66 | #define yychar zconfchar | 71 | #define yychar zconfchar |
67 | #define yydebug zconfdebug | 72 | #define yydebug zconfdebug |
68 | #define yynerrs zconfnerrs | 73 | #define yynerrs zconfnerrs |
69 | |||
70 | |||
71 | /* Tokens. */ | ||
72 | #ifndef YYTOKENTYPE | ||
73 | # define YYTOKENTYPE | ||
74 | /* Put the tokens into the symbol table, so that GDB and other debuggers | ||
75 | know about them. */ | ||
76 | enum yytokentype { | ||
77 | T_MAINMENU = 258, | ||
78 | T_MENU = 259, | ||
79 | T_ENDMENU = 260, | ||
80 | T_SOURCE = 261, | ||
81 | T_CHOICE = 262, | ||
82 | T_ENDCHOICE = 263, | ||
83 | T_COMMENT = 264, | ||
84 | T_CONFIG = 265, | ||
85 | T_MENUCONFIG = 266, | ||
86 | T_HELP = 267, | ||
87 | T_HELPTEXT = 268, | ||
88 | T_IF = 269, | ||
89 | T_ENDIF = 270, | ||
90 | T_DEPENDS = 271, | ||
91 | T_OPTIONAL = 272, | ||
92 | T_PROMPT = 273, | ||
93 | T_TYPE = 274, | ||
94 | T_DEFAULT = 275, | ||
95 | T_SELECT = 276, | ||
96 | T_RANGE = 277, | ||
97 | T_OPTION = 278, | ||
98 | T_ON = 279, | ||
99 | T_WORD = 280, | ||
100 | T_WORD_QUOTE = 281, | ||
101 | T_UNEQUAL = 282, | ||
102 | T_CLOSE_PAREN = 283, | ||
103 | T_OPEN_PAREN = 284, | ||
104 | T_EOL = 285, | ||
105 | T_OR = 286, | ||
106 | T_AND = 287, | ||
107 | T_EQUAL = 288, | ||
108 | T_NOT = 289 | ||
109 | }; | ||
110 | #endif | ||
111 | /* Tokens. */ | ||
112 | #define T_MAINMENU 258 | ||
113 | #define T_MENU 259 | ||
114 | #define T_ENDMENU 260 | ||
115 | #define T_SOURCE 261 | ||
116 | #define T_CHOICE 262 | ||
117 | #define T_ENDCHOICE 263 | ||
118 | #define T_COMMENT 264 | ||
119 | #define T_CONFIG 265 | ||
120 | #define T_MENUCONFIG 266 | ||
121 | #define T_HELP 267 | ||
122 | #define T_HELPTEXT 268 | ||
123 | #define T_IF 269 | ||
124 | #define T_ENDIF 270 | ||
125 | #define T_DEPENDS 271 | ||
126 | #define T_OPTIONAL 272 | ||
127 | #define T_PROMPT 273 | ||
128 | #define T_TYPE 274 | ||
129 | #define T_DEFAULT 275 | ||
130 | #define T_SELECT 276 | ||
131 | #define T_RANGE 277 | ||
132 | #define T_OPTION 278 | ||
133 | #define T_ON 279 | ||
134 | #define T_WORD 280 | ||
135 | #define T_WORD_QUOTE 281 | ||
136 | #define T_UNEQUAL 282 | ||
137 | #define T_CLOSE_PAREN 283 | ||
138 | #define T_OPEN_PAREN 284 | ||
139 | #define T_EOL 285 | ||
140 | #define T_OR 286 | ||
141 | #define T_AND 287 | ||
142 | #define T_EQUAL 288 | ||
143 | #define T_NOT 289 | ||
144 | |||
145 | |||
146 | 74 | ||
147 | 75 | ||
148 | /* Copy the first part of user declarations. */ | 76 | /* Copy the first part of user declarations. */ |
@@ -163,8 +91,6 @@ | |||
163 | #define LKC_DIRECT_LINK | 91 | #define LKC_DIRECT_LINK |
164 | #include "lkc.h" | 92 | #include "lkc.h" |
165 | 93 | ||
166 | #include "zconf.hash.c" | ||
167 | |||
168 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) | 94 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) |
169 | 95 | ||
170 | #define PRINTD 0x0001 | 96 | #define PRINTD 0x0001 |
@@ -188,6 +114,7 @@ static struct menu *current_menu, *current_entry; | |||
188 | #endif | 114 | #endif |
189 | 115 | ||
190 | 116 | ||
117 | |||
191 | /* Enabling traces. */ | 118 | /* Enabling traces. */ |
192 | #ifndef YYDEBUG | 119 | #ifndef YYDEBUG |
193 | # define YYDEBUG 0 | 120 | # define YYDEBUG 0 |
@@ -206,31 +133,77 @@ static struct menu *current_menu, *current_entry; | |||
206 | # define YYTOKEN_TABLE 0 | 133 | # define YYTOKEN_TABLE 0 |
207 | #endif | 134 | #endif |
208 | 135 | ||
136 | |||
137 | /* Tokens. */ | ||
138 | #ifndef YYTOKENTYPE | ||
139 | # define YYTOKENTYPE | ||
140 | /* Put the tokens into the symbol table, so that GDB and other debuggers | ||
141 | know about them. */ | ||
142 | enum yytokentype { | ||
143 | T_MAINMENU = 258, | ||
144 | T_MENU = 259, | ||
145 | T_ENDMENU = 260, | ||
146 | T_SOURCE = 261, | ||
147 | T_CHOICE = 262, | ||
148 | T_ENDCHOICE = 263, | ||
149 | T_COMMENT = 264, | ||
150 | T_CONFIG = 265, | ||
151 | T_MENUCONFIG = 266, | ||
152 | T_HELP = 267, | ||
153 | T_HELPTEXT = 268, | ||
154 | T_IF = 269, | ||
155 | T_ENDIF = 270, | ||
156 | T_DEPENDS = 271, | ||
157 | T_OPTIONAL = 272, | ||
158 | T_PROMPT = 273, | ||
159 | T_TYPE = 274, | ||
160 | T_DEFAULT = 275, | ||
161 | T_SELECT = 276, | ||
162 | T_RANGE = 277, | ||
163 | T_OPTION = 278, | ||
164 | T_ON = 279, | ||
165 | T_WORD = 280, | ||
166 | T_WORD_QUOTE = 281, | ||
167 | T_UNEQUAL = 282, | ||
168 | T_CLOSE_PAREN = 283, | ||
169 | T_OPEN_PAREN = 284, | ||
170 | T_EOL = 285, | ||
171 | T_OR = 286, | ||
172 | T_AND = 287, | ||
173 | T_EQUAL = 288, | ||
174 | T_NOT = 289 | ||
175 | }; | ||
176 | #endif | ||
177 | |||
178 | |||
179 | |||
209 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | 180 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
210 | typedef union YYSTYPE | 181 | typedef union YYSTYPE |
211 | |||
212 | { | 182 | { |
183 | |||
184 | |||
213 | char *string; | 185 | char *string; |
214 | struct file *file; | 186 | struct file *file; |
215 | struct symbol *symbol; | 187 | struct symbol *symbol; |
216 | struct expr *expr; | 188 | struct expr *expr; |
217 | struct menu *menu; | 189 | struct menu *menu; |
218 | struct kconf_id *id; | 190 | struct kconf_id *id; |
219 | } | ||
220 | /* Line 187 of yacc.c. */ | ||
221 | 191 | ||
222 | YYSTYPE; | 192 | |
193 | |||
194 | } YYSTYPE; | ||
195 | # define YYSTYPE_IS_TRIVIAL 1 | ||
223 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | 196 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
224 | # define YYSTYPE_IS_DECLARED 1 | 197 | # define YYSTYPE_IS_DECLARED 1 |
225 | # define YYSTYPE_IS_TRIVIAL 1 | ||
226 | #endif | 198 | #endif |
227 | 199 | ||
228 | 200 | ||
229 | |||
230 | /* Copy the second part of user declarations. */ | 201 | /* Copy the second part of user declarations. */ |
231 | 202 | ||
232 | 203 | ||
233 | /* Line 216 of yacc.c. */ | 204 | /* Include zconf.hash.c here so it can see the token constants. */ |
205 | #include "zconf.hash.c" | ||
206 | |||
234 | 207 | ||
235 | 208 | ||
236 | #ifdef short | 209 | #ifdef short |
@@ -306,14 +279,14 @@ typedef short int yytype_int16; | |||
306 | #if (defined __STDC__ || defined __C99__FUNC__ \ | 279 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
307 | || defined __cplusplus || defined _MSC_VER) | 280 | || defined __cplusplus || defined _MSC_VER) |
308 | static int | 281 | static int |
309 | YYID (int i) | 282 | YYID (int yyi) |
310 | #else | 283 | #else |
311 | static int | 284 | static int |
312 | YYID (i) | 285 | YYID (yyi) |
313 | int i; | 286 | int yyi; |
314 | #endif | 287 | #endif |
315 | { | 288 | { |
316 | return i; | 289 | return yyi; |
317 | } | 290 | } |
318 | #endif | 291 | #endif |
319 | 292 | ||
@@ -394,9 +367,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ | |||
394 | /* A type that is properly aligned for any stack member. */ | 367 | /* A type that is properly aligned for any stack member. */ |
395 | union yyalloc | 368 | union yyalloc |
396 | { | 369 | { |
397 | yytype_int16 yyss; | 370 | yytype_int16 yyss_alloc; |
398 | YYSTYPE yyvs; | 371 | YYSTYPE yyvs_alloc; |
399 | }; | 372 | }; |
400 | 373 | ||
401 | /* The size of the maximum gap between one aligned stack and the next. */ | 374 | /* The size of the maximum gap between one aligned stack and the next. */ |
402 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) | 375 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
@@ -430,12 +403,12 @@ union yyalloc | |||
430 | elements in the stack, and YYPTR gives the new location of the | 403 | elements in the stack, and YYPTR gives the new location of the |
431 | stack. Advance YYPTR to a properly aligned location for the next | 404 | stack. Advance YYPTR to a properly aligned location for the next |
432 | stack. */ | 405 | stack. */ |
433 | # define YYSTACK_RELOCATE(Stack) \ | 406 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
434 | do \ | 407 | do \ |
435 | { \ | 408 | { \ |
436 | YYSIZE_T yynewbytes; \ | 409 | YYSIZE_T yynewbytes; \ |
437 | YYCOPY (&yyptr->Stack, Stack, yysize); \ | 410 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
438 | Stack = &yyptr->Stack; \ | 411 | Stack = &yyptr->Stack_alloc; \ |
439 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ | 412 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
440 | yyptr += yynewbytes / sizeof (*yyptr); \ | 413 | yyptr += yynewbytes / sizeof (*yyptr); \ |
441 | } \ | 414 | } \ |
@@ -558,18 +531,18 @@ static const yytype_int8 yyrhs[] = | |||
558 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | 531 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
559 | static const yytype_uint16 yyrline[] = | 532 | static const yytype_uint16 yyrline[] = |
560 | { | 533 | { |
561 | 0, 104, 104, 106, 108, 109, 110, 111, 112, 113, | 534 | 0, 107, 107, 109, 111, 112, 113, 114, 115, 116, |
562 | 114, 118, 122, 122, 122, 122, 122, 122, 122, 126, | 535 | 117, 121, 125, 125, 125, 125, 125, 125, 125, 129, |
563 | 127, 128, 129, 130, 131, 135, 136, 142, 150, 156, | 536 | 130, 131, 132, 133, 134, 138, 139, 145, 153, 159, |
564 | 164, 174, 176, 177, 178, 179, 180, 181, 184, 192, | 537 | 167, 177, 179, 180, 181, 182, 183, 184, 187, 195, |
565 | 198, 208, 214, 220, 223, 225, 236, 237, 242, 251, | 538 | 201, 211, 217, 223, 226, 228, 239, 240, 245, 254, |
566 | 256, 264, 267, 269, 270, 271, 272, 273, 276, 282, | 539 | 259, 267, 270, 272, 273, 274, 275, 276, 279, 285, |
567 | 293, 299, 309, 311, 316, 324, 332, 335, 337, 338, | 540 | 296, 302, 312, 314, 319, 327, 335, 338, 340, 341, |
568 | 339, 344, 351, 356, 364, 367, 369, 370, 371, 374, | 541 | 342, 347, 354, 359, 367, 370, 372, 373, 374, 377, |
569 | 382, 389, 396, 402, 409, 411, 412, 413, 416, 424, | 542 | 385, 392, 399, 405, 412, 414, 415, 416, 419, 427, |
570 | 426, 431, 432, 435, 436, 437, 441, 442, 445, 446, | 543 | 429, 434, 435, 438, 439, 440, 444, 445, 448, 449, |
571 | 449, 450, 451, 452, 453, 454, 455, 458, 459, 462, | 544 | 452, 453, 454, 455, 456, 457, 458, 461, 462, 465, |
572 | 463 | 545 | 466 |
573 | }; | 546 | }; |
574 | #endif | 547 | #endif |
575 | 548 | ||
@@ -985,17 +958,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) | |||
985 | #if (defined __STDC__ || defined __C99__FUNC__ \ | 958 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
986 | || defined __cplusplus || defined _MSC_VER) | 959 | || defined __cplusplus || defined _MSC_VER) |
987 | static void | 960 | static void |
988 | yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) | 961 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
989 | #else | 962 | #else |
990 | static void | 963 | static void |
991 | yy_stack_print (bottom, top) | 964 | yy_stack_print (yybottom, yytop) |
992 | yytype_int16 *bottom; | 965 | yytype_int16 *yybottom; |
993 | yytype_int16 *top; | 966 | yytype_int16 *yytop; |
994 | #endif | 967 | #endif |
995 | { | 968 | { |
996 | YYFPRINTF (stderr, "Stack now"); | 969 | YYFPRINTF (stderr, "Stack now"); |
997 | for (; bottom <= top; ++bottom) | 970 | for (; yybottom <= yytop; yybottom++) |
998 | YYFPRINTF (stderr, " %d", *bottom); | 971 | { |
972 | int yybot = *yybottom; | ||
973 | YYFPRINTF (stderr, " %d", yybot); | ||
974 | } | ||
999 | YYFPRINTF (stderr, "\n"); | 975 | YYFPRINTF (stderr, "\n"); |
1000 | } | 976 | } |
1001 | 977 | ||
@@ -1029,11 +1005,11 @@ yy_reduce_print (yyvsp, yyrule) | |||
1029 | /* The symbols being reduced. */ | 1005 | /* The symbols being reduced. */ |
1030 | for (yyi = 0; yyi < yynrhs; yyi++) | 1006 | for (yyi = 0; yyi < yynrhs; yyi++) |
1031 | { | 1007 | { |
1032 | fprintf (stderr, " $%d = ", yyi + 1); | 1008 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
1033 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], | 1009 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
1034 | &(yyvsp[(yyi + 1) - (yynrhs)]) | 1010 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
1035 | ); | 1011 | ); |
1036 | fprintf (stderr, "\n"); | 1012 | YYFPRINTF (stderr, "\n"); |
1037 | } | 1013 | } |
1038 | } | 1014 | } |
1039 | 1015 | ||
@@ -1343,10 +1319,8 @@ yydestruct (yymsg, yytype, yyvaluep) | |||
1343 | break; | 1319 | break; |
1344 | } | 1320 | } |
1345 | } | 1321 | } |
1346 | |||
1347 | 1322 | ||
1348 | /* Prevent warnings from -Wmissing-prototypes. */ | 1323 | /* Prevent warnings from -Wmissing-prototypes. */ |
1349 | |||
1350 | #ifdef YYPARSE_PARAM | 1324 | #ifdef YYPARSE_PARAM |
1351 | #if defined __STDC__ || defined __cplusplus | 1325 | #if defined __STDC__ || defined __cplusplus |
1352 | int yyparse (void *YYPARSE_PARAM); | 1326 | int yyparse (void *YYPARSE_PARAM); |
@@ -1362,11 +1336,10 @@ int yyparse (); | |||
1362 | #endif /* ! YYPARSE_PARAM */ | 1336 | #endif /* ! YYPARSE_PARAM */ |
1363 | 1337 | ||
1364 | 1338 | ||
1365 | 1339 | /* The lookahead symbol. */ | |
1366 | /* The look-ahead symbol. */ | ||
1367 | int yychar; | 1340 | int yychar; |
1368 | 1341 | ||
1369 | /* The semantic value of the look-ahead symbol. */ | 1342 | /* The semantic value of the lookahead symbol. */ |
1370 | YYSTYPE yylval; | 1343 | YYSTYPE yylval; |
1371 | 1344 | ||
1372 | /* Number of syntax errors so far. */ | 1345 | /* Number of syntax errors so far. */ |
@@ -1374,9 +1347,9 @@ int yynerrs; | |||
1374 | 1347 | ||
1375 | 1348 | ||
1376 | 1349 | ||
1377 | /*----------. | 1350 | /*-------------------------. |
1378 | | yyparse. | | 1351 | | yyparse or yypush_parse. | |
1379 | `----------*/ | 1352 | `-------------------------*/ |
1380 | 1353 | ||
1381 | #ifdef YYPARSE_PARAM | 1354 | #ifdef YYPARSE_PARAM |
1382 | #if (defined __STDC__ || defined __C99__FUNC__ \ | 1355 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
@@ -1400,66 +1373,68 @@ yyparse () | |||
1400 | #endif | 1373 | #endif |
1401 | #endif | 1374 | #endif |
1402 | { | 1375 | { |
1403 | |||
1404 | int yystate; | ||
1405 | int yyn; | ||
1406 | int yyresult; | ||
1407 | /* Number of tokens to shift before error messages enabled. */ | ||
1408 | int yyerrstatus; | ||
1409 | /* Look-ahead token as an internal (translated) token number. */ | ||
1410 | int yytoken = 0; | ||
1411 | #if YYERROR_VERBOSE | ||
1412 | /* Buffer for error messages, and its allocated size. */ | ||
1413 | char yymsgbuf[128]; | ||
1414 | char *yymsg = yymsgbuf; | ||
1415 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; | ||
1416 | #endif | ||
1417 | |||
1418 | /* Three stacks and their tools: | ||
1419 | `yyss': related to states, | ||
1420 | `yyvs': related to semantic values, | ||
1421 | `yyls': related to locations. | ||
1422 | 1376 | ||
1423 | Refer to the stacks thru separate pointers, to allow yyoverflow | ||
1424 | to reallocate them elsewhere. */ | ||
1425 | 1377 | ||
1426 | /* The state stack. */ | 1378 | int yystate; |
1427 | yytype_int16 yyssa[YYINITDEPTH]; | 1379 | /* Number of tokens to shift before error messages enabled. */ |
1428 | yytype_int16 *yyss = yyssa; | 1380 | int yyerrstatus; |
1429 | yytype_int16 *yyssp; | ||
1430 | 1381 | ||
1431 | /* The semantic value stack. */ | 1382 | /* The stacks and their tools: |
1432 | YYSTYPE yyvsa[YYINITDEPTH]; | 1383 | `yyss': related to states. |
1433 | YYSTYPE *yyvs = yyvsa; | 1384 | `yyvs': related to semantic values. |
1434 | YYSTYPE *yyvsp; | ||
1435 | 1385 | ||
1386 | Refer to the stacks thru separate pointers, to allow yyoverflow | ||
1387 | to reallocate them elsewhere. */ | ||
1436 | 1388 | ||
1389 | /* The state stack. */ | ||
1390 | yytype_int16 yyssa[YYINITDEPTH]; | ||
1391 | yytype_int16 *yyss; | ||
1392 | yytype_int16 *yyssp; | ||
1437 | 1393 | ||
1438 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) | 1394 | /* The semantic value stack. */ |
1395 | YYSTYPE yyvsa[YYINITDEPTH]; | ||
1396 | YYSTYPE *yyvs; | ||
1397 | YYSTYPE *yyvsp; | ||
1439 | 1398 | ||
1440 | YYSIZE_T yystacksize = YYINITDEPTH; | 1399 | YYSIZE_T yystacksize; |
1441 | 1400 | ||
1401 | int yyn; | ||
1402 | int yyresult; | ||
1403 | /* Lookahead token as an internal (translated) token number. */ | ||
1404 | int yytoken; | ||
1442 | /* The variables used to return semantic value and location from the | 1405 | /* The variables used to return semantic value and location from the |
1443 | action routines. */ | 1406 | action routines. */ |
1444 | YYSTYPE yyval; | 1407 | YYSTYPE yyval; |
1445 | 1408 | ||
1409 | #if YYERROR_VERBOSE | ||
1410 | /* Buffer for error messages, and its allocated size. */ | ||
1411 | char yymsgbuf[128]; | ||
1412 | char *yymsg = yymsgbuf; | ||
1413 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; | ||
1414 | #endif | ||
1415 | |||
1416 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) | ||
1446 | 1417 | ||
1447 | /* The number of symbols on the RHS of the reduced rule. | 1418 | /* The number of symbols on the RHS of the reduced rule. |
1448 | Keep to zero when no symbol should be popped. */ | 1419 | Keep to zero when no symbol should be popped. */ |
1449 | int yylen = 0; | 1420 | int yylen = 0; |
1450 | 1421 | ||
1422 | yytoken = 0; | ||
1423 | yyss = yyssa; | ||
1424 | yyvs = yyvsa; | ||
1425 | yystacksize = YYINITDEPTH; | ||
1426 | |||
1451 | YYDPRINTF ((stderr, "Starting parse\n")); | 1427 | YYDPRINTF ((stderr, "Starting parse\n")); |
1452 | 1428 | ||
1453 | yystate = 0; | 1429 | yystate = 0; |
1454 | yyerrstatus = 0; | 1430 | yyerrstatus = 0; |
1455 | yynerrs = 0; | 1431 | yynerrs = 0; |
1456 | yychar = YYEMPTY; /* Cause a token to be read. */ | 1432 | yychar = YYEMPTY; /* Cause a token to be read. */ |
1457 | 1433 | ||
1458 | /* Initialize stack pointers. | 1434 | /* Initialize stack pointers. |
1459 | Waste one element of value and location stack | 1435 | Waste one element of value and location stack |
1460 | so that they stay on the same level as the state stack. | 1436 | so that they stay on the same level as the state stack. |
1461 | The wasted elements are never initialized. */ | 1437 | The wasted elements are never initialized. */ |
1462 | |||
1463 | yyssp = yyss; | 1438 | yyssp = yyss; |
1464 | yyvsp = yyvs; | 1439 | yyvsp = yyvs; |
1465 | 1440 | ||
@@ -1489,7 +1464,6 @@ yyparse () | |||
1489 | YYSTYPE *yyvs1 = yyvs; | 1464 | YYSTYPE *yyvs1 = yyvs; |
1490 | yytype_int16 *yyss1 = yyss; | 1465 | yytype_int16 *yyss1 = yyss; |
1491 | 1466 | ||
1492 | |||
1493 | /* Each stack pointer address is followed by the size of the | 1467 | /* Each stack pointer address is followed by the size of the |
1494 | data in use in that stack, in bytes. This used to be a | 1468 | data in use in that stack, in bytes. This used to be a |
1495 | conditional around just the two extra args, but that might | 1469 | conditional around just the two extra args, but that might |
@@ -1497,7 +1471,6 @@ yyparse () | |||
1497 | yyoverflow (YY_("memory exhausted"), | 1471 | yyoverflow (YY_("memory exhausted"), |
1498 | &yyss1, yysize * sizeof (*yyssp), | 1472 | &yyss1, yysize * sizeof (*yyssp), |
1499 | &yyvs1, yysize * sizeof (*yyvsp), | 1473 | &yyvs1, yysize * sizeof (*yyvsp), |
1500 | |||
1501 | &yystacksize); | 1474 | &yystacksize); |
1502 | 1475 | ||
1503 | yyss = yyss1; | 1476 | yyss = yyss1; |
@@ -1520,9 +1493,8 @@ yyparse () | |||
1520 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | 1493 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
1521 | if (! yyptr) | 1494 | if (! yyptr) |
1522 | goto yyexhaustedlab; | 1495 | goto yyexhaustedlab; |
1523 | YYSTACK_RELOCATE (yyss); | 1496 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
1524 | YYSTACK_RELOCATE (yyvs); | 1497 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
1525 | |||
1526 | # undef YYSTACK_RELOCATE | 1498 | # undef YYSTACK_RELOCATE |
1527 | if (yyss1 != yyssa) | 1499 | if (yyss1 != yyssa) |
1528 | YYSTACK_FREE (yyss1); | 1500 | YYSTACK_FREE (yyss1); |
@@ -1533,7 +1505,6 @@ yyparse () | |||
1533 | yyssp = yyss + yysize - 1; | 1505 | yyssp = yyss + yysize - 1; |
1534 | yyvsp = yyvs + yysize - 1; | 1506 | yyvsp = yyvs + yysize - 1; |
1535 | 1507 | ||
1536 | |||
1537 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", | 1508 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
1538 | (unsigned long int) yystacksize)); | 1509 | (unsigned long int) yystacksize)); |
1539 | 1510 | ||
@@ -1543,6 +1514,9 @@ yyparse () | |||
1543 | 1514 | ||
1544 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); | 1515 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
1545 | 1516 | ||
1517 | if (yystate == YYFINAL) | ||
1518 | YYACCEPT; | ||
1519 | |||
1546 | goto yybackup; | 1520 | goto yybackup; |
1547 | 1521 | ||
1548 | /*-----------. | 1522 | /*-----------. |
@@ -1551,16 +1525,16 @@ yyparse () | |||
1551 | yybackup: | 1525 | yybackup: |
1552 | 1526 | ||
1553 | /* Do appropriate processing given the current state. Read a | 1527 | /* Do appropriate processing given the current state. Read a |
1554 | look-ahead token if we need one and don't already have one. */ | 1528 | lookahead token if we need one and don't already have one. */ |
1555 | 1529 | ||
1556 | /* First try to decide what to do without reference to look-ahead token. */ | 1530 | /* First try to decide what to do without reference to lookahead token. */ |
1557 | yyn = yypact[yystate]; | 1531 | yyn = yypact[yystate]; |
1558 | if (yyn == YYPACT_NINF) | 1532 | if (yyn == YYPACT_NINF) |
1559 | goto yydefault; | 1533 | goto yydefault; |
1560 | 1534 | ||
1561 | /* Not known => get a look-ahead token if don't already have one. */ | 1535 | /* Not known => get a lookahead token if don't already have one. */ |
1562 | 1536 | ||
1563 | /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ | 1537 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
1564 | if (yychar == YYEMPTY) | 1538 | if (yychar == YYEMPTY) |
1565 | { | 1539 | { |
1566 | YYDPRINTF ((stderr, "Reading a token: ")); | 1540 | YYDPRINTF ((stderr, "Reading a token: ")); |
@@ -1592,20 +1566,16 @@ yybackup: | |||
1592 | goto yyreduce; | 1566 | goto yyreduce; |
1593 | } | 1567 | } |
1594 | 1568 | ||
1595 | if (yyn == YYFINAL) | ||
1596 | YYACCEPT; | ||
1597 | |||
1598 | /* Count tokens shifted since error; after three, turn off error | 1569 | /* Count tokens shifted since error; after three, turn off error |
1599 | status. */ | 1570 | status. */ |
1600 | if (yyerrstatus) | 1571 | if (yyerrstatus) |
1601 | yyerrstatus--; | 1572 | yyerrstatus--; |
1602 | 1573 | ||
1603 | /* Shift the look-ahead token. */ | 1574 | /* Shift the lookahead token. */ |
1604 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | 1575 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
1605 | 1576 | ||
1606 | /* Discard the shifted token unless it is eof. */ | 1577 | /* Discard the shifted token. */ |
1607 | if (yychar != YYEOF) | 1578 | yychar = YYEMPTY; |
1608 | yychar = YYEMPTY; | ||
1609 | 1579 | ||
1610 | yystate = yyn; | 1580 | yystate = yyn; |
1611 | *++yyvsp = yylval; | 1581 | *++yyvsp = yylval; |
@@ -2029,7 +1999,6 @@ yyreduce: | |||
2029 | break; | 1999 | break; |
2030 | 2000 | ||
2031 | 2001 | ||
2032 | /* Line 1267 of yacc.c. */ | ||
2033 | 2002 | ||
2034 | default: break; | 2003 | default: break; |
2035 | } | 2004 | } |
@@ -2041,7 +2010,6 @@ yyreduce: | |||
2041 | 2010 | ||
2042 | *++yyvsp = yyval; | 2011 | *++yyvsp = yyval; |
2043 | 2012 | ||
2044 | |||
2045 | /* Now `shift' the result of the reduction. Determine what state | 2013 | /* Now `shift' the result of the reduction. Determine what state |
2046 | that goes to, based on the state we popped back to and the rule | 2014 | that goes to, based on the state we popped back to and the rule |
2047 | number reduced by. */ | 2015 | number reduced by. */ |
@@ -2106,7 +2074,7 @@ yyerrlab: | |||
2106 | 2074 | ||
2107 | if (yyerrstatus == 3) | 2075 | if (yyerrstatus == 3) |
2108 | { | 2076 | { |
2109 | /* If just tried and failed to reuse look-ahead token after an | 2077 | /* If just tried and failed to reuse lookahead token after an |
2110 | error, discard it. */ | 2078 | error, discard it. */ |
2111 | 2079 | ||
2112 | if (yychar <= YYEOF) | 2080 | if (yychar <= YYEOF) |
@@ -2123,7 +2091,7 @@ yyerrlab: | |||
2123 | } | 2091 | } |
2124 | } | 2092 | } |
2125 | 2093 | ||
2126 | /* Else will try to reuse look-ahead token after shifting the error | 2094 | /* Else will try to reuse lookahead token after shifting the error |
2127 | token. */ | 2095 | token. */ |
2128 | goto yyerrlab1; | 2096 | goto yyerrlab1; |
2129 | 2097 | ||
@@ -2180,9 +2148,6 @@ yyerrlab1: | |||
2180 | YY_STACK_PRINT (yyss, yyssp); | 2148 | YY_STACK_PRINT (yyss, yyssp); |
2181 | } | 2149 | } |
2182 | 2150 | ||
2183 | if (yyn == YYFINAL) | ||
2184 | YYACCEPT; | ||
2185 | |||
2186 | *++yyvsp = yylval; | 2151 | *++yyvsp = yylval; |
2187 | 2152 | ||
2188 | 2153 | ||
@@ -2207,7 +2172,7 @@ yyabortlab: | |||
2207 | yyresult = 1; | 2172 | yyresult = 1; |
2208 | goto yyreturn; | 2173 | goto yyreturn; |
2209 | 2174 | ||
2210 | #ifndef yyoverflow | 2175 | #if !defined(yyoverflow) || YYERROR_VERBOSE |
2211 | /*-------------------------------------------------. | 2176 | /*-------------------------------------------------. |
2212 | | yyexhaustedlab -- memory exhaustion comes here. | | 2177 | | yyexhaustedlab -- memory exhaustion comes here. | |
2213 | `-------------------------------------------------*/ | 2178 | `-------------------------------------------------*/ |
@@ -2218,7 +2183,7 @@ yyexhaustedlab: | |||
2218 | #endif | 2183 | #endif |
2219 | 2184 | ||
2220 | yyreturn: | 2185 | yyreturn: |
2221 | if (yychar != YYEOF && yychar != YYEMPTY) | 2186 | if (yychar != YYEMPTY) |
2222 | yydestruct ("Cleanup: discarding lookahead", | 2187 | yydestruct ("Cleanup: discarding lookahead", |
2223 | yytoken, &yylval); | 2188 | yytoken, &yylval); |
2224 | /* Do not reclaim the symbols of the rule which action triggered | 2189 | /* Do not reclaim the symbols of the rule which action triggered |
@@ -2284,7 +2249,7 @@ void conf_parse(const char *name) | |||
2284 | sym_set_change_count(1); | 2249 | sym_set_change_count(1); |
2285 | } | 2250 | } |
2286 | 2251 | ||
2287 | const char *zconf_tokenname(int token) | 2252 | static const char *zconf_tokenname(int token) |
2288 | { | 2253 | { |
2289 | switch (token) { | 2254 | switch (token) { |
2290 | case T_MENU: return "menu"; | 2255 | case T_MENU: return "menu"; |
@@ -2348,7 +2313,7 @@ static void zconferror(const char *err) | |||
2348 | #endif | 2313 | #endif |
2349 | } | 2314 | } |
2350 | 2315 | ||
2351 | void print_quoted_string(FILE *out, const char *str) | 2316 | static void print_quoted_string(FILE *out, const char *str) |
2352 | { | 2317 | { |
2353 | const char *p; | 2318 | const char *p; |
2354 | int len; | 2319 | int len; |
@@ -2365,7 +2330,7 @@ void print_quoted_string(FILE *out, const char *str) | |||
2365 | putc('"', out); | 2330 | putc('"', out); |
2366 | } | 2331 | } |
2367 | 2332 | ||
2368 | void print_symbol(FILE *out, struct menu *menu) | 2333 | static void print_symbol(FILE *out, struct menu *menu) |
2369 | { | 2334 | { |
2370 | struct symbol *sym = menu->sym; | 2335 | struct symbol *sym = menu->sym; |
2371 | struct property *prop; | 2336 | struct property *prop; |
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 9710b82466f2..8c43491f8cc9 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
@@ -14,8 +14,6 @@ | |||
14 | #define LKC_DIRECT_LINK | 14 | #define LKC_DIRECT_LINK |
15 | #include "lkc.h" | 15 | #include "lkc.h" |
16 | 16 | ||
17 | #include "zconf.hash.c" | ||
18 | |||
19 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) | 17 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) |
20 | 18 | ||
21 | #define PRINTD 0x0001 | 19 | #define PRINTD 0x0001 |
@@ -100,6 +98,11 @@ static struct menu *current_menu, *current_entry; | |||
100 | menu_end_menu(); | 98 | menu_end_menu(); |
101 | } if_entry menu_entry choice_entry | 99 | } if_entry menu_entry choice_entry |
102 | 100 | ||
101 | %{ | ||
102 | /* Include zconf.hash.c here so it can see the token constants. */ | ||
103 | #include "zconf.hash.c" | ||
104 | %} | ||
105 | |||
103 | %% | 106 | %% |
104 | input: stmt_list; | 107 | input: stmt_list; |
105 | 108 | ||
@@ -501,7 +504,7 @@ void conf_parse(const char *name) | |||
501 | sym_set_change_count(1); | 504 | sym_set_change_count(1); |
502 | } | 505 | } |
503 | 506 | ||
504 | const char *zconf_tokenname(int token) | 507 | static const char *zconf_tokenname(int token) |
505 | { | 508 | { |
506 | switch (token) { | 509 | switch (token) { |
507 | case T_MENU: return "menu"; | 510 | case T_MENU: return "menu"; |
@@ -565,7 +568,7 @@ static void zconferror(const char *err) | |||
565 | #endif | 568 | #endif |
566 | } | 569 | } |
567 | 570 | ||
568 | void print_quoted_string(FILE *out, const char *str) | 571 | static void print_quoted_string(FILE *out, const char *str) |
569 | { | 572 | { |
570 | const char *p; | 573 | const char *p; |
571 | int len; | 574 | int len; |
@@ -582,7 +585,7 @@ void print_quoted_string(FILE *out, const char *str) | |||
582 | putc('"', out); | 585 | putc('"', out); |
583 | } | 586 | } |
584 | 587 | ||
585 | void print_symbol(FILE *out, struct menu *menu) | 588 | static void print_symbol(FILE *out, struct menu *menu) |
586 | { | 589 | { |
587 | struct symbol *sym = menu->sym; | 590 | struct symbol *sym = menu->sym; |
588 | struct property *prop; | 591 | struct property *prop; |