Commit ed9df091491dd41d4e054071948c8e2e5b354c99

Authored by Josh Triplett
1 parent 6516657180

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>

Showing 2 changed files with 52 additions and 45 deletions Side-by-side Diff

scripts/genksyms/keywords.c_shipped
1   -/* ANSI-C code produced by gperf version 3.0.2 */
  1 +/* ANSI-C code produced by gperf version 3.0.3 */
2 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 4 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
... ... @@ -30,7 +30,9 @@
30 30  
31 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 36 struct resword { const char *name; int token; };
35 37 /* maximum key range = 62, duplicates = 0 */
36 38  
37 39  
... ... @@ -78,7 +80,10 @@
78 80  
79 81 #ifdef __GNUC__
80 82 __inline
  83 +#ifdef __GNUC_STDC_INLINE__
  84 +__attribute__ ((__gnu_inline__))
81 85 #endif
  86 +#endif
82 87 const struct resword *
83 88 is_reserved_word (register const char *str, register unsigned int len)
84 89 {
85 90  
86 91  
87 92  
88 93  
89 94  
90 95  
91 96  
92 97  
93 98  
94 99  
95 100  
96 101  
97 102  
98 103  
99 104  
100 105  
101 106  
102 107  
103 108  
104 109  
105 110  
106 111  
107 112  
108 113  
109 114  
110 115  
111 116  
112 117  
113 118  
114 119  
115 120  
116 121  
117 122  
118 123  
119 124  
120 125  
121 126  
122 127  
123 128  
124 129  
125 130  
126 131  
... ... @@ -94,105 +99,105 @@
94 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 103 {"asm", ASM_KEYW},
99 104 {""},
100   -#line 8 "scripts/genksyms/keywords.gperf"
  105 +#line 10 "scripts/genksyms/keywords.gperf"
101 106 {"__asm", ASM_KEYW},
102 107 {""},
103   -#line 9 "scripts/genksyms/keywords.gperf"
  108 +#line 11 "scripts/genksyms/keywords.gperf"
104 109 {"__asm__", ASM_KEYW},
105 110 {""}, {""},
106   -#line 52 "scripts/genksyms/keywords.gperf"
  111 +#line 54 "scripts/genksyms/keywords.gperf"
107 112 {"__typeof__", TYPEOF_KEYW},
108 113 {""},
109   -#line 12 "scripts/genksyms/keywords.gperf"
  114 +#line 14 "scripts/genksyms/keywords.gperf"
110 115 {"__const", CONST_KEYW},
111   -#line 11 "scripts/genksyms/keywords.gperf"
112   - {"__attribute__", ATTRIBUTE_KEYW},
113 116 #line 13 "scripts/genksyms/keywords.gperf"
  117 + {"__attribute__", ATTRIBUTE_KEYW},
  118 +#line 15 "scripts/genksyms/keywords.gperf"
114 119 {"__const__", CONST_KEYW},
115   -#line 18 "scripts/genksyms/keywords.gperf"
  120 +#line 20 "scripts/genksyms/keywords.gperf"
116 121 {"__signed__", SIGNED_KEYW},
117   -#line 44 "scripts/genksyms/keywords.gperf"
  122 +#line 46 "scripts/genksyms/keywords.gperf"
118 123 {"static", STATIC_KEYW},
119   -#line 20 "scripts/genksyms/keywords.gperf"
  124 +#line 22 "scripts/genksyms/keywords.gperf"
120 125 {"__volatile__", VOLATILE_KEYW},
121   -#line 39 "scripts/genksyms/keywords.gperf"
  126 +#line 41 "scripts/genksyms/keywords.gperf"
122 127 {"int", INT_KEYW},
123   -#line 32 "scripts/genksyms/keywords.gperf"
  128 +#line 34 "scripts/genksyms/keywords.gperf"
124 129 {"char", CHAR_KEYW},
125   -#line 33 "scripts/genksyms/keywords.gperf"
  130 +#line 35 "scripts/genksyms/keywords.gperf"
126 131 {"const", CONST_KEYW},
127   -#line 45 "scripts/genksyms/keywords.gperf"
  132 +#line 47 "scripts/genksyms/keywords.gperf"
128 133 {"struct", STRUCT_KEYW},
129   -#line 24 "scripts/genksyms/keywords.gperf"
  134 +#line 26 "scripts/genksyms/keywords.gperf"
130 135 {"__restrict__", RESTRICT_KEYW},
131   -#line 25 "scripts/genksyms/keywords.gperf"
  136 +#line 27 "scripts/genksyms/keywords.gperf"
132 137 {"restrict", RESTRICT_KEYW},
133   -#line 23 "scripts/genksyms/keywords.gperf"
  138 +#line 25 "scripts/genksyms/keywords.gperf"
134 139 {"_restrict", RESTRICT_KEYW},
135   -#line 16 "scripts/genksyms/keywords.gperf"
  140 +#line 18 "scripts/genksyms/keywords.gperf"
136 141 {"__inline__", INLINE_KEYW},
137   -#line 10 "scripts/genksyms/keywords.gperf"
  142 +#line 12 "scripts/genksyms/keywords.gperf"
138 143 {"__attribute", ATTRIBUTE_KEYW},
139 144 {""},
140   -#line 14 "scripts/genksyms/keywords.gperf"
  145 +#line 16 "scripts/genksyms/keywords.gperf"
141 146 {"__extension__", EXTENSION_KEYW},
142   -#line 35 "scripts/genksyms/keywords.gperf"
  147 +#line 37 "scripts/genksyms/keywords.gperf"
143 148 {"enum", ENUM_KEYW},
144   -#line 19 "scripts/genksyms/keywords.gperf"
  149 +#line 21 "scripts/genksyms/keywords.gperf"
145 150 {"__volatile", VOLATILE_KEYW},
146   -#line 36 "scripts/genksyms/keywords.gperf"
  151 +#line 38 "scripts/genksyms/keywords.gperf"
147 152 {"extern", EXTERN_KEYW},
148 153 {""},
149   -#line 17 "scripts/genksyms/keywords.gperf"
  154 +#line 19 "scripts/genksyms/keywords.gperf"
150 155 {"__signed", SIGNED_KEYW},
151   -#line 7 "scripts/genksyms/keywords.gperf"
  156 +#line 9 "scripts/genksyms/keywords.gperf"
152 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 160 {"typeof", TYPEOF_KEYW},
156   -#line 46 "scripts/genksyms/keywords.gperf"
  161 +#line 48 "scripts/genksyms/keywords.gperf"
157 162 {"typedef", TYPEDEF_KEYW},
158   -#line 15 "scripts/genksyms/keywords.gperf"
  163 +#line 17 "scripts/genksyms/keywords.gperf"
159 164 {"__inline", INLINE_KEYW},
160   -#line 31 "scripts/genksyms/keywords.gperf"
  165 +#line 33 "scripts/genksyms/keywords.gperf"
161 166 {"auto", AUTO_KEYW},
162   -#line 47 "scripts/genksyms/keywords.gperf"
  167 +#line 49 "scripts/genksyms/keywords.gperf"
163 168 {"union", UNION_KEYW},
164 169 {""}, {""},
165   -#line 48 "scripts/genksyms/keywords.gperf"
  170 +#line 50 "scripts/genksyms/keywords.gperf"
166 171 {"unsigned", UNSIGNED_KEYW},
167   -#line 49 "scripts/genksyms/keywords.gperf"
  172 +#line 51 "scripts/genksyms/keywords.gperf"
168 173 {"void", VOID_KEYW},
169   -#line 42 "scripts/genksyms/keywords.gperf"
  174 +#line 44 "scripts/genksyms/keywords.gperf"
170 175 {"short", SHORT_KEYW},
171 176 {""}, {""},
172   -#line 50 "scripts/genksyms/keywords.gperf"
  177 +#line 52 "scripts/genksyms/keywords.gperf"
173 178 {"volatile", VOLATILE_KEYW},
174 179 {""},
175   -#line 37 "scripts/genksyms/keywords.gperf"
  180 +#line 39 "scripts/genksyms/keywords.gperf"
176 181 {"float", FLOAT_KEYW},
177   -#line 34 "scripts/genksyms/keywords.gperf"
  182 +#line 36 "scripts/genksyms/keywords.gperf"
178 183 {"double", DOUBLE_KEYW},
179 184 {""},
180   -#line 5 "scripts/genksyms/keywords.gperf"
  185 +#line 7 "scripts/genksyms/keywords.gperf"
181 186 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW},
182 187 {""}, {""},
183   -#line 38 "scripts/genksyms/keywords.gperf"
  188 +#line 40 "scripts/genksyms/keywords.gperf"
184 189 {"inline", INLINE_KEYW},
185   -#line 6 "scripts/genksyms/keywords.gperf"
  190 +#line 8 "scripts/genksyms/keywords.gperf"
186 191 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
187   -#line 41 "scripts/genksyms/keywords.gperf"
  192 +#line 43 "scripts/genksyms/keywords.gperf"
188 193 {"register", REGISTER_KEYW},
189 194 {""},
190   -#line 22 "scripts/genksyms/keywords.gperf"
  195 +#line 24 "scripts/genksyms/keywords.gperf"
191 196 {"_Bool", BOOL_KEYW},
192   -#line 43 "scripts/genksyms/keywords.gperf"
  197 +#line 45 "scripts/genksyms/keywords.gperf"
193 198 {"signed", SIGNED_KEYW},
194 199 {""}, {""},
195   -#line 40 "scripts/genksyms/keywords.gperf"
  200 +#line 42 "scripts/genksyms/keywords.gperf"
196 201 {"long", LONG_KEYW}
197 202 };
198 203  
scripts/genksyms/keywords.gperf
1 1 %{
  2 +struct resword;
  3 +static const struct resword *is_reserved_word(register const char *str, register unsigned int len);
2 4 %}
3 5 struct resword { const char *name; int token; }
4 6 %%