aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gperf.1
diff options
context:
space:
mode:
Diffstat (limited to 'doc/gperf.1')
-rw-r--r--doc/gperf.1103
1 files changed, 66 insertions, 37 deletions
diff --git a/doc/gperf.1 b/doc/gperf.1
index dd425e0c7e2c..786604ef050c 100644
--- a/doc/gperf.1
+++ b/doc/gperf.1
@@ -1,21 +1,27 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022.
-.TH GPERF "1" "September 2000" "GNU gperf 2.7.2" FSF
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
+.TH GPERF "1" "May 2007" "GNU gperf 3.0.3" FSF
.SH NAME
gperf \- generate a perfect hash function from a key set
.SH SYNOPSIS
.B gperf
[\fIOPTION\fR]... [\fIINPUT-FILE\fR]
.SH DESCRIPTION
-GNU `gperf' generates perfect hash functions.
+GNU 'gperf' generates perfect hash functions.
.PP
If a long option shows an argument as mandatory, then it is mandatory
for the equivalent short option also.
+.SS "Output file location:"
+.HP
+\fB\-\-output\-file\fR=\fIFILE\fR Write output to specified file.
+.PP
+The results are written to standard output if no output file is specified
+or if it is -.
.SS "Input file interpretation:"
.TP
\fB\-e\fR, \fB\-\-delimiters\fR=\fIDELIMITER\-LIST\fR
Allow user to provide a string containing delimiters
used to separate keywords from their attributes.
-Default is ",\en".
+Default is ",".
.TP
\fB\-t\fR, \fB\-\-struct\-type\fR
Allows the user to include a structured type
@@ -23,6 +29,11 @@ declaration for generated code. Any text before %%
is considered part of the type declaration. Key
words and additional fields may follow this, one
group of fields per line.
+.TP
+\fB\-\-ignore\-case\fR
+Consider upper and lower case ASCII characters as
+equivalent. Note that locale dependent case mappings
+are ignored.
.SS "Language for the output code:"
.TP
\fB\-L\fR, \fB\-\-language\fR=\fILANGUAGE\-NAME\fR
@@ -39,21 +50,27 @@ structure.
Initializers for additional components in the keyword
structure.
.TP
-\fB\-H\fR, \fB\-\-hash\-fn\-name\fR=\fINAME\fR
+\fB\-H\fR, \fB\-\-hash\-function\-name\fR=\fINAME\fR
Specify name of generated hash function. Default is
-`hash'.
+\&'hash'.
.TP
-\fB\-N\fR, \fB\-\-lookup\-fn\-name\fR=\fINAME\fR
+\fB\-N\fR, \fB\-\-lookup\-function\-name\fR=\fINAME\fR
Specify name of generated lookup function. Default
-name is `in_word_set'.
+name is 'in_word_set'.
.TP
\fB\-Z\fR, \fB\-\-class\-name\fR=\fINAME\fR
Specify name of generated C++ class. Default name is
-`Perfect_Hash'.
+\&'Perfect_Hash'.
.TP
\fB\-7\fR, \fB\-\-seven\-bit\fR
Assume 7-bit characters.
.TP
+\fB\-l\fR, \fB\-\-compare\-lengths\fR
+Compare key lengths before trying a string
+comparison. This is necessary if the keywords
+contain NUL bytes. It also helps cut down on the
+number of string comparisons made during the lookup.
+.TP
\fB\-c\fR, \fB\-\-compare\-strncmp\fR
Generate comparison code using strncmp rather than
strcmp.
@@ -70,14 +87,31 @@ lookup function rather than with defines.
Include the necessary system include file <string.h>
at the beginning of the code.
.TP
-\fB\-G\fR, \fB\-\-global\fR
+\fB\-G\fR, \fB\-\-global\-table\fR
Generate the static table of keywords as a static
global variable, rather than hiding it inside of the
lookup function (which is the default behavior).
.TP
+\fB\-P\fR, \fB\-\-pic\fR
+Optimize the generated table for inclusion in shared
+libraries. This reduces the startup time of programs
+using a shared library containing the generated code.
+.TP
+\fB\-Q\fR, \fB\-\-string\-pool\-name\fR=\fINAME\fR
+Specify name of string pool generated by option \fB\-\-pic\fR.
+Default name is 'stringpool'.
+.TP
+\fB\-\-null\-strings\fR
+Use NULL strings instead of empty strings for empty
+keyword table entries.
+.TP
\fB\-W\fR, \fB\-\-word\-array\-name\fR=\fINAME\fR
Specify name of word list array. Default name is
-`wordlist'.
+\&'wordlist'.
+.TP
+\fB\-\-length\-table\-name\fR=\fINAME\fR
+Specify name of length table array. Default name is
+\&'lengthtable'.
.TP
\fB\-S\fR, \fB\-\-switch\fR=\fICOUNT\fR
Causes the generated C code to use a switch
@@ -99,30 +133,23 @@ defined elsewhere.
.TP
\fB\-k\fR, \fB\-\-key\-positions\fR=\fIKEYS\fR
Select the key positions used in the hash function.
-The allowable choices range between 1-126, inclusive.
+The allowable choices range between 1-255, inclusive.
The positions are separated by commas, ranges may be
used, and key positions may occur in any order.
Also, the meta-character '*' causes the generated
hash function to consider ALL key positions, and $
-indicates the ``final character'' of a key, e.g.,
+indicates the "final character" of a key, e.g.,
$,1,2,4,6-10.
.TP
-\fB\-l\fR, \fB\-\-compare\-strlen\fR
-Compare key lengths before trying a string
-comparison. This helps cut down on the number of
-string comparisons made during the lookup.
-.TP
\fB\-D\fR, \fB\-\-duplicates\fR
Handle keywords that hash to duplicate values. This
is useful for certain highly redundant keyword sets.
.TP
-\fB\-f\fR, \fB\-\-fast\fR=\fIITERATIONS\fR
-Generate the gen-perf.hash function ``fast''. This
-decreases gperf's running time at the cost of
-minimizing generated table size. The numeric
-argument represents the number of times to iterate
-when resolving a collision. `0' means ``iterate by
-the number of keywords''.
+\fB\-m\fR, \fB\-\-multiple\-iterations\fR=\fIITERATIONS\fR
+Perform multiple choices of the \fB\-i\fR and \fB\-j\fR values,
+and choose the best results. This increases the
+running time by a factor of ITERATIONS but does a
+good job minimizing the generated table size.
.TP
\fB\-i\fR, \fB\-\-initial\-asso\fR=\fIN\fR
Provide an initial value for the associate values
@@ -130,7 +157,7 @@ array. Default is 0. Setting this value larger helps
inflate the size of the final table.
.TP
\fB\-j\fR, \fB\-\-jump\fR=\fIJUMP\-VALUE\fR
-Affects the ``jump value'', i.e., how far to advance
+Affects the "jump value", i.e., how far to advance
the associated character value upon collisions. Must
be an odd number, default is 5.
.TP
@@ -138,25 +165,20 @@ be an odd number, default is 5.
Do not include the length of the keyword when
computing the hash function.
.TP
-\fB\-o\fR, \fB\-\-occurrence\-sort\fR
-Reorders input keys by frequency of occurrence of
-the key sets. This should decrease the search time
-dramatically.
-.TP
\fB\-r\fR, \fB\-\-random\fR
Utilizes randomness to initialize the associated
values table.
.TP
\fB\-s\fR, \fB\-\-size\-multiple\fR=\fIN\fR
Affects the size of the generated hash table. The
-numeric argument N indicates ``how many times larger
-or smaller'' the associated value range should be,
+numeric argument N indicates "how many times larger
+or smaller" the associated value range should be,
in relationship to the number of keys, e.g. a value
-of 3 means ``allow the maximum associated value to
+of 3 means "allow the maximum associated value to
be about 3 times larger than the number of input
-keys.'' Conversely, a value of \fB\-3\fR means ``make the
+keys". Conversely, a value of 1/3 means "make the
maximum associated value about 3 times smaller than
-the number of input keys. A larger table should
+the number of input keys". A larger table should
decrease the time required for an unsuccessful
search, at the expense of extra table space. Default
value is 1.
@@ -171,8 +193,15 @@ Print the gperf version number.
\fB\-d\fR, \fB\-\-debug\fR
Enables the debugging option (produces verbose
output to the standard error).
+.SH AUTHOR
+Written by Douglas C. Schmidt and Bruno Haible.
.SH "REPORTING BUGS"
-Report bugs to <bug-gnu-utils@gnu.org>.
+Report bugs to <bug-gnu-gperf@gnu.org>.
+.SH COPYRIGHT
+Copyright \(co 1989-1998, 2000-2004, 2006-2007 Free Software Foundation, Inc.
+.br
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.SH "SEE ALSO"
The full documentation for
.B gperf