aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2009-10-15 15:58:40 -0400
committerJosh Triplett <josh@joshtriplett.org>2009-11-15 18:01:22 -0500
commited9df091491dd41d4e054071948c8e2e5b354c99 (patch)
tree7a9f8e36027944e9fff166ff8b99e5d6a2a45ff4
parent65166571800af0f63f21e5576d7db12d2bf73790 (diff)
genksyms: Mark is_reserved_word static
The genksyms keyword gperf hash provides a function is_reserved_word. genksyms #includes the resulting generated file keywords.c, so the function gets used only in the same source file that defines it. Mark is_reserved_word static, and regenerate the corresponding generated file. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r--scripts/genksyms/keywords.c_shipped95
-rw-r--r--scripts/genksyms/keywords.gperf2
2 files changed, 52 insertions, 45 deletions
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" 33struct resword;
34static const struct resword *is_reserved_word(register const char *str, register unsigned int len);
35#line 5 "scripts/genksyms/keywords.gperf"
34struct resword { const char *name; int token; }; 36struct 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
82const struct resword * 87const struct resword *
83is_reserved_word (register const char *str, register unsigned int len) 88is_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%{
2struct resword;
3static const struct resword *is_reserved_word(register const char *str, register unsigned int len);
2%} 4%}
3struct resword { const char *name; int token; } 5struct resword { const char *name; int token; }
4%% 6%%