Mercurial > hg > toybox
annotate kconfig/zconf.hash.c_shipped @ 1755:ab3532a61d52 draft
Fix toybox build with C99 compilers
toybox "make menuconfig" currently fails to build if the compiler is in C99
mode (clang 3.6 and gcc 5.0 snapshots default to C99 mode, you can also
reproduce the failure with older gcc by using 'make menuconfig HOSTCC="gcc
-std=gnu99"').
The problem is that inline semantics changed in C99, and kconf_id_lookup's
inline-ness depends on C89 semantics there.
author | Bernhard Rosenkr?nzer <bernhard.rosenkranzer@linaro.org> |
---|---|
date | Wed, 25 Mar 2015 13:46:34 -0500 |
parents | 4d21d59f3206 |
children |
rev | line source |
---|---|
10
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
1 /* ANSI-C code produced by gperf version 3.0.1 */ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
2 /* Command-line: gperf */ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
3 /* Computed positions: -k'1,3' */ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
4 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
5 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
6 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
7 && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
8 && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
9 && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
10 && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
11 && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
12 && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
13 && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
14 && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
15 && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
16 && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
17 && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
18 && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
19 && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
20 && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
21 && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
22 && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
23 && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
24 && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
25 && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
26 && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
27 && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
28 /* The character set is not based on ISO-646. */ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
29 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
30 #endif |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
31 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
32 struct kconf_id; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
33 /* maximum key range = 45, duplicates = 0 */ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
34 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
35 #ifdef __GNUC__ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
36 __inline |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
37 #else |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
38 #ifdef __cplusplus |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
39 inline |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
40 #endif |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
41 #endif |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
42 static unsigned int |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
43 kconf_id_hash (register const char *str, register unsigned int len) |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
44 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
45 static unsigned char asso_values[] = |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
46 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
47 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
48 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
49 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
50 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
51 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
52 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
53 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
54 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
55 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
56 47, 47, 47, 47, 47, 47, 47, 25, 30, 15, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
57 0, 15, 0, 47, 5, 15, 47, 47, 30, 20, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
58 5, 0, 25, 15, 0, 0, 10, 35, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
59 5, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
60 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
61 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
62 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
63 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
64 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
65 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
66 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
67 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
68 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
69 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
70 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
71 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
72 47, 47, 47, 47, 47, 47 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
73 }; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
74 register int hval = len; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
75 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
76 switch (hval) |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
77 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
78 default: |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
79 hval += asso_values[(unsigned char)str[2]]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
80 /*FALLTHROUGH*/ |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
81 case 2: |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
82 case 1: |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
83 hval += asso_values[(unsigned char)str[0]]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
84 break; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
85 } |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
86 return hval; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
87 } |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
88 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
89 struct kconf_id_strings_t |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
90 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
91 char kconf_id_strings_str2[sizeof("on")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
92 char kconf_id_strings_str6[sizeof("string")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
93 char kconf_id_strings_str7[sizeof("default")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
94 char kconf_id_strings_str8[sizeof("def_bool")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
95 char kconf_id_strings_str10[sizeof("range")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
96 char kconf_id_strings_str11[sizeof("def_boolean")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
97 char kconf_id_strings_str12[sizeof("def_tristate")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
98 char kconf_id_strings_str13[sizeof("hex")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
99 char kconf_id_strings_str14[sizeof("defconfig_list")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
100 char kconf_id_strings_str16[sizeof("option")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
101 char kconf_id_strings_str17[sizeof("if")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
102 char kconf_id_strings_str18[sizeof("optional")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
103 char kconf_id_strings_str20[sizeof("endif")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
104 char kconf_id_strings_str21[sizeof("choice")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
105 char kconf_id_strings_str22[sizeof("endmenu")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
106 char kconf_id_strings_str23[sizeof("requires")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
107 char kconf_id_strings_str24[sizeof("endchoice")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
108 char kconf_id_strings_str26[sizeof("config")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
109 char kconf_id_strings_str27[sizeof("modules")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
110 char kconf_id_strings_str28[sizeof("int")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
111 char kconf_id_strings_str29[sizeof("menu")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
112 char kconf_id_strings_str31[sizeof("prompt")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
113 char kconf_id_strings_str32[sizeof("depends")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
114 char kconf_id_strings_str33[sizeof("tristate")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
115 char kconf_id_strings_str34[sizeof("bool")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
116 char kconf_id_strings_str35[sizeof("menuconfig")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
117 char kconf_id_strings_str36[sizeof("select")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
118 char kconf_id_strings_str37[sizeof("boolean")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
119 char kconf_id_strings_str39[sizeof("help")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
120 char kconf_id_strings_str41[sizeof("source")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
121 char kconf_id_strings_str42[sizeof("comment")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
122 char kconf_id_strings_str43[sizeof("mainmenu")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
123 char kconf_id_strings_str46[sizeof("enable")]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
124 }; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
125 static struct kconf_id_strings_t kconf_id_strings_contents = |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
126 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
127 "on", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
128 "string", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
129 "default", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
130 "def_bool", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
131 "range", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
132 "def_boolean", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
133 "def_tristate", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
134 "hex", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
135 "defconfig_list", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
136 "option", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
137 "if", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
138 "optional", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
139 "endif", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
140 "choice", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
141 "endmenu", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
142 "requires", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
143 "endchoice", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
144 "config", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
145 "modules", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
146 "int", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
147 "menu", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
148 "prompt", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
149 "depends", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
150 "tristate", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
151 "bool", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
152 "menuconfig", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
153 "select", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
154 "boolean", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
155 "help", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
156 "source", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
157 "comment", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
158 "mainmenu", |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
159 "enable" |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
160 }; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
161 #define kconf_id_strings ((const char *) &kconf_id_strings_contents) |
1755
ab3532a61d52
Fix toybox build with C99 compilers
Bernhard Rosenkr?nzer <bernhard.rosenkranzer@linaro.org>
parents:
10
diff
changeset
|
162 #if defined(__GNUC__) && __STDC_VERSION__ < 199901L |
10
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
163 __inline |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
164 #endif |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
165 struct kconf_id * |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
166 kconf_id_lookup (register const char *str, register unsigned int len) |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
167 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
168 enum |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
169 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
170 TOTAL_KEYWORDS = 33, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
171 MIN_WORD_LENGTH = 2, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
172 MAX_WORD_LENGTH = 14, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
173 MIN_HASH_VALUE = 2, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
174 MAX_HASH_VALUE = 46 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
175 }; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
176 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
177 static struct kconf_id wordlist[] = |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
178 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
179 {-1}, {-1}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
180 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
181 {-1}, {-1}, {-1}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
182 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_TYPE, TF_COMMAND, S_STRING}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
183 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
184 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
185 {-1}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
186 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
187 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
188 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
189 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_TYPE, TF_COMMAND, S_HEX}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
190 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
191 {-1}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
192 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_OPTION, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
193 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_IF, TF_COMMAND|TF_PARAM}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
194 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
195 {-1}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
196 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_ENDIF, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
197 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CHOICE, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
198 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
199 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_REQUIRES, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
200 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str24, T_ENDCHOICE, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
201 {-1}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
202 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_CONFIG, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
203 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
204 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_INT}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
205 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
206 {-1}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
207 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_PROMPT, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
208 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_DEPENDS, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
209 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_TYPE, TF_COMMAND, S_TRISTATE}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
210 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str34, T_TYPE, TF_COMMAND, S_BOOLEAN}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
211 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
212 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_SELECT, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
213 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
214 {-1}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
215 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_HELP, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
216 {-1}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
217 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
218 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_COMMENT, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
219 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_MAINMENU, TF_COMMAND}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
220 {-1}, {-1}, |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
221 {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND} |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
222 }; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
223 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
224 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
225 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
226 register int key = kconf_id_hash (str, len); |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
227 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
228 if (key <= MAX_HASH_VALUE && key >= 0) |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
229 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
230 register int o = wordlist[key].name; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
231 if (o >= 0) |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
232 { |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
233 register const char *s = o + kconf_id_strings; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
234 |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
235 if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0') |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
236 return &wordlist[key]; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
237 } |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
238 } |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
239 } |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
240 return 0; |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
241 } |
4d21d59f3206
Add menuconfig, plus some basic Config info, lots of which is just future
landley@driftwood
parents:
diff
changeset
|
242 |