1 /* C code produced by gperf version 2.3 (GNU C++ version) */
2 /* Command-line: gperf -p -a -t -k 1,3,4 -c -C -N lookup_keyword -T pic.gperf */
3 /* Copyright (C) 1989, 1990 Free Software Foundation, Inc.
4 Written by James Clark (jjc@jclark.uucp)
6 This file is part of groff.
8 groff is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 1, or (at your option) any later
13 groff is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 You should have received a copy of the GNU General Public License along
19 with groff; see the file LICENSE. If not, write to the Free Software
20 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
27 #define TOTAL_KEYWORDS 81
28 #define MIN_WORD_LENGTH 2
29 #define MAX_WORD_LENGTH 9
30 #define MIN_HASH_VALUE 2
31 #define MAX_HASH_VALUE 276
32 /* maximum key range = 275, duplicates = 0 */
35 hash (register const char *str
, register int len
)
37 static const unsigned short asso_values
[] =
39 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
40 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
41 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
42 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
43 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
44 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
45 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
46 277, 277, 5, 277, 277, 277, 277, 277, 277, 277,
47 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
48 277, 277, 277, 277, 277, 277, 277, 25, 20, 40,
49 55, 35, 105, 35, 15, 110, 277, 277, 40, 95,
50 25, 70, 7, 277, 30, 100, 0, 85, 20, 17,
51 5, 5, 277, 277, 277, 277, 277, 277,
53 register int hval
= len
;
59 hval
+= asso_values
[str
[3]];
61 hval
+= asso_values
[str
[2]];
64 hval
+= asso_values
[str
[0]];
69 const struct keyword
*
70 lookup_keyword (register const char *str
, register int len
)
73 static const struct keyword wordlist
[] =
76 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
78 {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
80 {"",}, {"",}, {"",}, {"",},
87 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
96 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
126 {"",}, {"",}, {"",}, {"",},
135 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
147 {"",}, {"",}, {"",}, {"",},
158 {"",}, {"",}, {"",}, {"",},
165 {"",}, {"",}, {"",}, {"",},
167 {"thick", THICKNESS
},
169 {"thickness", THICKNESS
},
171 {"",}, {"",}, {"",}, {"",}, {"",},
179 {"aligned", ALIGNED
},
184 {"diameter", DIAMETER
},
185 {"",}, {"",}, {"",}, {"",}, {"",},
189 {"ellipse", ELLIPSE
},
190 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
193 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
194 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
197 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
201 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
203 {"invis", INVISIBLE
},
205 {"sprintf", SPRINTF
},
207 {"invisible", INVISIBLE
},
208 {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
210 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
211 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
217 if (len
<= MAX_WORD_LENGTH
&& len
>= MIN_WORD_LENGTH
)
219 register int key
= hash (str
, len
) - MIN_HASH_VALUE
;
221 if (key
<= (MAX_HASH_VALUE
- MIN_HASH_VALUE
) && key
>= 0)
223 register const char *s
= wordlist
[key
].name
;
225 if (*s
== *str
&& !strncmp (str
+ 1, s
+ 1, len
- 1))
226 return &wordlist
[key
];