1 -a Generate ANSI standard C output code
, i.e.
, function prototypes.
2 -b Generate code
for Linear Search.
3 -B Generate code
for Binary Search.
4 -c Generate comparison code using strncmp rather than strcmp.
5 -C Make the contents of generated lookup tables constant
, i.e.
, readonly.
6 -d Enables the debugging option
(produces verbose output to the standard
8 -D Handle keywords that hash to duplicate
values. This is useful
9 for certain highly redundant keyword sets.
10 -e Allow user to provide a string containing delimiters used to separate
11 keywords from their attributes. Default is
",\n"
12 -E
Define constant
values using an enum local to the lookup function
13 rather than with defines
14 -f Generate the gen
-perf.hash function ``fast.
'' This decreases GPERF
's
15 running time at the cost of minimizing generated table-size.
16 The numeric argument represents the number of times to iterate when
17 resolving a collision. `0' means ``iterate by the number of keywords.
''
18 -F Provided expression will be used to assign default
values in keyword
19 table
, i.e.
, the fill value. Default is
"".
20 -g Make generated routines use ``inline
'' to remove function overhead.
21 -G Generate the static table of keywords as a static global
variable,
22 rather than hiding it inside of the lookup function
(which is the
24 -h Prints this message.
25 -H Allow user to specify
name of generated hash function. Default
27 -i Provide an initial value for the associate values array. Default is 0.
28 -I Generate comparison code using case insensitive string comparison, e.g.,
29 strncasecmp or strcasecmp.
30 Setting this value larger helps inflate the size of the final table.
31 -j Affects the ``jump value,'' i.e., how far to advance the associated
32 character value upon collisions. Must be an odd number, default is 5.
33 -J Skips '#
include <string.h
>' part in the output.
34 -k Allows selection of the key positions used in the hash function.
35 The allowable choices range between 1-126, inclusive. The positions
36 are separated by commas, ranges may be used, and key positions may
37 occur in any order. Also, the meta-character '*' causes the generated
38 hash function to consider ALL key positions, and $ indicates the
39 ``final character'' of a key, e.g., $,1,2,4,6-10.
40 -K Allow use to select name of the keyword component in the keyword
42 -l Compare key lengths before trying a string comparison. This helps
43 cut down on the number of string comparisons made during the lookup.
44 -L Generates code in the language specified by the option's
argument.
45 Languages handled are currently C
++ and C. The default is C.
46 -m Avoids the warning about identical hash
values. This is valid
47 only
if the
-D option is enabled.
48 -M Skips class definition in the output. This is valid only in C
++ mode.
49 -n
Do not
include the length of the keyword when computing the hash
51 -N Allow user to specify
name of generated lookup function. Default
52 name is `in_word_set.
'
53 -o Reorders input keys by frequency of occurrence of the key sets.
54 This should decrease the search time dramatically.
55 -O Optimize the generated lookup function by assuming that all input
56 keywords are members of the keyset from the keyfile.
57 -p Changes the return value of the generated function ``in_word_set''
58 from its default boolean value (i.e., 0 or 1), to type ``pointer
59 to wordlist array'' This is most useful when the -t option, allowing
60 user-defined structs, is used.
61 -r Utilizes randomness to initialize the associated values table.
62 -s Affects the size of the generated hash table. The numeric argument
63 for this option indicates ``how many times larger or smaller'' the
64 associated value range should be, in relationship to the number of
65 keys, e.g. a value of 3 means ``allow the maximum associated value
66 to be about 3 times larger than the number of input keys.''
67 Conversely, a value of -3 means ``make the maximum associated
68 value about 3 times smaller than the number of input keys. A
69 larger table should decrease the time required for an unsuccessful
70 search, at the expense of extra table space. Default value is 1.
71 -S Causes the generated C code to use a switch statement scheme, rather
72 than an array lookup table. This can lead to a reduction in both
73 time and space requirements for some keyfiles. The argument to
74 this option determines how many switch statements are generated.
75 A value of 1 generates 1 switch containing all the elements, a value
76 of 2 generates 2 tables with 1/2 the elements in each table, etc.
77 This is useful since many C compilers cannot correctly generate code
78 for large switch statements.
79 -t Allows the user to include a structured type declaration for
80 generated code. Any text before %% is consider part of the type
81 declaration. Key words and additional fields may follow this, one
82 group of fields per line.
83 -T Prevents the transfer of the type declaration to the output file.
84 Use this option if the type is already defined elsewhere.
85 -v Prints out the current version number and exits with a value of 0
86 -V Exits silently with a value of 0.
87 -Z Allow user to specify name of generated C++ class. Default
88 name is `Perfect_Hash.'
89 Usage
: ..
/src
/gperf
[-abBcCdDef
[num
]gGhH
<hashname
>i
<init
>IjJk
<keys
>K
<keyname
>lL
<language
>mMnN
<function
name>oOprs
<size
>S
<switches
>tTvVZ
<class
name>].
90 (type ..
/src
/gperf
-h
for help
)