1*cdf0e10cSrcweir /* C++ code produced by gperf version 3.0.1 */
2*cdf0e10cSrcweir /* Command-line: gperf -C -t -l -L C++ -m 20 -Z PdfKeywordHash keyword_list  */
3*cdf0e10cSrcweir /* Computed positions: -k'4-5,$' */
4*cdf0e10cSrcweir 
5*cdf0e10cSrcweir #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
6*cdf0e10cSrcweir       && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
7*cdf0e10cSrcweir       && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
8*cdf0e10cSrcweir       && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
9*cdf0e10cSrcweir       && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
10*cdf0e10cSrcweir       && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
11*cdf0e10cSrcweir       && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
12*cdf0e10cSrcweir       && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
13*cdf0e10cSrcweir       && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
14*cdf0e10cSrcweir       && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
15*cdf0e10cSrcweir       && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
16*cdf0e10cSrcweir       && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
17*cdf0e10cSrcweir       && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
18*cdf0e10cSrcweir       && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
19*cdf0e10cSrcweir       && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
20*cdf0e10cSrcweir       && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
21*cdf0e10cSrcweir       && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
22*cdf0e10cSrcweir       && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
23*cdf0e10cSrcweir       && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
24*cdf0e10cSrcweir       && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
25*cdf0e10cSrcweir       && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
26*cdf0e10cSrcweir       && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
27*cdf0e10cSrcweir       && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
28*cdf0e10cSrcweir /* The character set is not based on ISO-646.  */
29*cdf0e10cSrcweir #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
30*cdf0e10cSrcweir #endif
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir #line 1 "keyword_list"
33*cdf0e10cSrcweir struct hash_entry { const char* name; enum parseKey eKey; };
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir #if defined __GNUC__
36*cdf0e10cSrcweir #pragma GCC system_header
37*cdf0e10cSrcweir #endif
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir #define TOTAL_KEYWORDS 46
40*cdf0e10cSrcweir #define MIN_WORD_LENGTH 7
41*cdf0e10cSrcweir #define MAX_WORD_LENGTH 19
42*cdf0e10cSrcweir #define MIN_HASH_VALUE 8
43*cdf0e10cSrcweir #define MAX_HASH_VALUE 68
44*cdf0e10cSrcweir /* maximum key range = 61, duplicates = 0 */
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir class PdfKeywordHash
47*cdf0e10cSrcweir {
48*cdf0e10cSrcweir private:
49*cdf0e10cSrcweir   static inline unsigned int hash (const char *str, unsigned int len);
50*cdf0e10cSrcweir public:
51*cdf0e10cSrcweir   static const struct hash_entry *in_word_set (const char *str, unsigned int len);
52*cdf0e10cSrcweir };
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir inline unsigned int
55*cdf0e10cSrcweir PdfKeywordHash::hash (register const char *str, register unsigned int len)
56*cdf0e10cSrcweir {
57*cdf0e10cSrcweir   static const unsigned char asso_values[] =
58*cdf0e10cSrcweir     {
59*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
60*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
61*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
62*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
63*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
64*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
65*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69,  9, 69, 38, 69,
66*cdf0e10cSrcweir        1, 69, 69, 69, 31, 69, 16, 35, 21, 69,
67*cdf0e10cSrcweir       15,  0, 69, 21, 15, 69, 69, 69, 69, 69,
68*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69,  0, 15, 69,
69*cdf0e10cSrcweir       69,  5,  8, 69,  4,  8,  0, 20,  2, 27,
70*cdf0e10cSrcweir       11, 31,  0, 69,  0,  9,  0,  5, 69,  5,
71*cdf0e10cSrcweir       69, 13, 69, 69, 69, 69, 69, 69, 69, 69,
72*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
73*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
74*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
75*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
76*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
77*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
78*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
79*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
80*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
81*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
82*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
83*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
84*cdf0e10cSrcweir       69, 69, 69, 69, 69, 69, 69
85*cdf0e10cSrcweir     };
86*cdf0e10cSrcweir   return len + asso_values[(unsigned char)str[4]+1] + asso_values[(unsigned char)str[3]] + asso_values[(unsigned char)str[len - 1]];
87*cdf0e10cSrcweir }
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir const struct hash_entry *
90*cdf0e10cSrcweir PdfKeywordHash::in_word_set (register const char *str, register unsigned int len)
91*cdf0e10cSrcweir {
92*cdf0e10cSrcweir   static const unsigned char lengthtable[] =
93*cdf0e10cSrcweir     {
94*cdf0e10cSrcweir        0,  0,  0,  0,  0,  0,  0,  0,  7,  0,  0,  0,  8, 12,
95*cdf0e10cSrcweir        8, 10, 10, 12, 13,  9, 15, 16, 17, 14, 15, 15, 10, 13,
96*cdf0e10cSrcweir       14, 15, 14, 11, 12,  9,  9, 17, 13, 19, 11,  8, 14,  9,
97*cdf0e10cSrcweir        7,  9, 19, 17, 15, 10, 13, 10,  9,  8, 17, 12,  8,  0,
98*cdf0e10cSrcweir        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 10,  8
99*cdf0e10cSrcweir     };
100*cdf0e10cSrcweir   static const struct hash_entry wordlist[] =
101*cdf0e10cSrcweir     {
102*cdf0e10cSrcweir       {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
103*cdf0e10cSrcweir #line 29 "keyword_list"
104*cdf0e10cSrcweir       {"setFont",SETFONT},
105*cdf0e10cSrcweir       {""}, {""}, {""},
106*cdf0e10cSrcweir #line 8 "keyword_list"
107*cdf0e10cSrcweir       {"clipPath",CLIPPATH},
108*cdf0e10cSrcweir #line 28 "keyword_list"
109*cdf0e10cSrcweir       {"setFillColor",SETFILLCOLOR},
110*cdf0e10cSrcweir #line 19 "keyword_list"
111*cdf0e10cSrcweir       {"fillPath",FILLPATH},
112*cdf0e10cSrcweir #line 46 "keyword_list"
113*cdf0e10cSrcweir       {"updateFont",UPDATEFONT},
114*cdf0e10cSrcweir #line 17 "keyword_list"
115*cdf0e10cSrcweir       {"eoClipPath",EOCLIPPATH},
116*cdf0e10cSrcweir #line 25 "keyword_list"
117*cdf0e10cSrcweir       {"restoreState",RESTORESTATE},
118*cdf0e10cSrcweir #line 47 "keyword_list"
119*cdf0e10cSrcweir       {"updateLineCap",UPDATELINECAP},
120*cdf0e10cSrcweir #line 39 "keyword_list"
121*cdf0e10cSrcweir       {"startPage",STARTPAGE},
122*cdf0e10cSrcweir #line 43 "keyword_list"
123*cdf0e10cSrcweir       {"updateFillColor",UPDATEFILLCOLOR},
124*cdf0e10cSrcweir #line 51 "keyword_list"
125*cdf0e10cSrcweir       {"updateMiterLimit",UPDATEMITERLIMIT},
126*cdf0e10cSrcweir #line 52 "keyword_list"
127*cdf0e10cSrcweir       {"updateStrokeColor",UPDATESTROKECOLOR},
128*cdf0e10cSrcweir #line 48 "keyword_list"
129*cdf0e10cSrcweir       {"updateLineDash",UPDATELINEDASH},
130*cdf0e10cSrcweir #line 50 "keyword_list"
131*cdf0e10cSrcweir       {"updateLineWidth",UPDATELINEWIDTH},
132*cdf0e10cSrcweir #line 41 "keyword_list"
133*cdf0e10cSrcweir       {"updateBlendMode",UPDATEBLENDMODE},
134*cdf0e10cSrcweir #line 30 "keyword_list"
135*cdf0e10cSrcweir       {"setLineCap",SETLINECAP},
136*cdf0e10cSrcweir #line 21 "keyword_list"
137*cdf0e10cSrcweir       {"intersectClip",INTERSECTCLIP},
138*cdf0e10cSrcweir #line 45 "keyword_list"
139*cdf0e10cSrcweir       {"updateFlatness",UPDATEFLATNESS},
140*cdf0e10cSrcweir #line 22 "keyword_list"
141*cdf0e10cSrcweir       {"intersectEoClip",INTERSECTEOCLIP},
142*cdf0e10cSrcweir #line 49 "keyword_list"
143*cdf0e10cSrcweir       {"updateLineJoin",UPDATELINEJOIN},
144*cdf0e10cSrcweir #line 31 "keyword_list"
145*cdf0e10cSrcweir       {"setLineDash",SETLINEDASH},
146*cdf0e10cSrcweir #line 33 "keyword_list"
147*cdf0e10cSrcweir       {"setLineWidth",SETLINEWIDTH},
148*cdf0e10cSrcweir #line 24 "keyword_list"
149*cdf0e10cSrcweir       {"pushState",PUSHSTATE},
150*cdf0e10cSrcweir #line 26 "keyword_list"
151*cdf0e10cSrcweir       {"saveState",SAVESTATE},
152*cdf0e10cSrcweir #line 44 "keyword_list"
153*cdf0e10cSrcweir       {"updateFillOpacity",UPDATEFILLOPACITY},
154*cdf0e10cSrcweir #line 16 "keyword_list"
155*cdf0e10cSrcweir       {"endTextObject",ENDTEXTOBJECT},
156*cdf0e10cSrcweir #line 53 "keyword_list"
157*cdf0e10cSrcweir       {"updateStrokeOpacity",UPDATESTROKEOPACITY},
158*cdf0e10cSrcweir #line 32 "keyword_list"
159*cdf0e10cSrcweir       {"setLineJoin",SETLINEJOIN},
160*cdf0e10cSrcweir #line 23 "keyword_list"
161*cdf0e10cSrcweir       {"popState",POPSTATE},
162*cdf0e10cSrcweir #line 36 "keyword_list"
163*cdf0e10cSrcweir       {"setStrokeColor",SETSTROKECOLOR},
164*cdf0e10cSrcweir #line 42 "keyword_list"
165*cdf0e10cSrcweir       {"updateCtm",UPDATECTM},
166*cdf0e10cSrcweir #line 15 "keyword_list"
167*cdf0e10cSrcweir       {"endPage",ENDPAGE},
168*cdf0e10cSrcweir #line 20 "keyword_list"
169*cdf0e10cSrcweir       {"hyperLink",HYPERLINK},
170*cdf0e10cSrcweir #line 14 "keyword_list"
171*cdf0e10cSrcweir       {"drawSoftMaskedImage",DRAWSOFTMASKEDIMAGE},
172*cdf0e10cSrcweir #line 37 "keyword_list"
173*cdf0e10cSrcweir       {"setTextRenderMode",SETTEXTRENDERMODE},
174*cdf0e10cSrcweir #line 13 "keyword_list"
175*cdf0e10cSrcweir       {"drawMaskedImage",DRAWMASKEDIMAGE},
176*cdf0e10cSrcweir #line 40 "keyword_list"
177*cdf0e10cSrcweir       {"strokePath",STROKEPATH},
178*cdf0e10cSrcweir #line 34 "keyword_list"
179*cdf0e10cSrcweir       {"setMiterLimit",SETMITERLIMIT},
180*cdf0e10cSrcweir #line 18 "keyword_list"
181*cdf0e10cSrcweir       {"eoFillPath",EOFILLPATH},
182*cdf0e10cSrcweir #line 10 "keyword_list"
183*cdf0e10cSrcweir       {"drawImage",DRAWIMAGE},
184*cdf0e10cSrcweir #line 9 "keyword_list"
185*cdf0e10cSrcweir       {"drawChar",DRAWCHAR},
186*cdf0e10cSrcweir #line 38 "keyword_list"
187*cdf0e10cSrcweir       {"setTransformation",SETTRANSFORMATION},
188*cdf0e10cSrcweir #line 27 "keyword_list"
189*cdf0e10cSrcweir       {"setBlendMode",SETBLENDMODE},
190*cdf0e10cSrcweir #line 12 "keyword_list"
191*cdf0e10cSrcweir       {"drawMask",DRAWMASK},
192*cdf0e10cSrcweir       {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
193*cdf0e10cSrcweir       {""}, {""}, {""},
194*cdf0e10cSrcweir #line 35 "keyword_list"
195*cdf0e10cSrcweir       {"setPageNum",SETPAGENUM},
196*cdf0e10cSrcweir #line 11 "keyword_list"
197*cdf0e10cSrcweir       {"drawLink",DRAWLINK	}
198*cdf0e10cSrcweir     };
199*cdf0e10cSrcweir 
200*cdf0e10cSrcweir   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
201*cdf0e10cSrcweir     {
202*cdf0e10cSrcweir       register int key = hash (str, len);
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir       if (key <= MAX_HASH_VALUE && key >= 0)
205*cdf0e10cSrcweir         if (len == lengthtable[key])
206*cdf0e10cSrcweir           {
207*cdf0e10cSrcweir             register const char *s = wordlist[key].name;
208*cdf0e10cSrcweir 
209*cdf0e10cSrcweir             if (*str == *s && !memcmp (str + 1, s + 1, len - 1))
210*cdf0e10cSrcweir               return &wordlist[key];
211*cdf0e10cSrcweir           }
212*cdf0e10cSrcweir     }
213*cdf0e10cSrcweir   return 0;
214*cdf0e10cSrcweir }
215