mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Turn doc/gperf.1 into a distributed built file.
This commit is contained in:
1
doc/.gitignore
vendored
1
doc/.gitignore
vendored
@@ -9,4 +9,5 @@
|
||||
/gperf_toc.html
|
||||
/gperf_[0-9].html
|
||||
/gperf_[0-9][0-9].html
|
||||
/gperf.1
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ SHELL = /bin/sh
|
||||
|
||||
VPATH = $(srcdir)
|
||||
|
||||
all : info ps pdf html
|
||||
all : info ps pdf html man
|
||||
|
||||
|
||||
info : $(srcdir)/gperf.info
|
||||
@@ -104,6 +104,14 @@ gperf_toc.html : $(srcdir)/gperf.texi $(srcdir)/gpl-3.0.texi
|
||||
cd $(srcdir) && $(TEXI2HTML) -number -split_chapter gperf.texi
|
||||
|
||||
|
||||
man : gperf.1
|
||||
|
||||
gperf.1 gperf.1-update :
|
||||
./help2man --name='generate a perfect hash function from a key set' --section=1 ../src/gperf > gperf.1
|
||||
|
||||
gperf.1-update : force
|
||||
|
||||
|
||||
install : all force
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
|
||||
$(INSTALL_DATA) $(srcdir)/gperf.info $(DESTDIR)$(infodir)/gperf.info
|
||||
@@ -158,8 +166,7 @@ IMPORTED_FILES = \
|
||||
help2man
|
||||
# List of distributed files generated by autotools or Makefile.devel.
|
||||
GENERATED_FILES = \
|
||||
configure \
|
||||
gperf.1
|
||||
configure
|
||||
# List of distributed files generated by "make".
|
||||
DISTRIBUTED_BUILT_FILES = \
|
||||
gperf.info \
|
||||
@@ -167,11 +174,12 @@ DISTRIBUTED_BUILT_FILES = \
|
||||
gperf.ps \
|
||||
gperf.pdf \
|
||||
gperf.html \
|
||||
gperf_toc.html gperf_[0-9].html gperf_[0-9][0-9].html
|
||||
gperf_toc.html gperf_[0-9].html gperf_[0-9][0-9].html \
|
||||
gperf.1
|
||||
# List of distributed files.
|
||||
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
|
||||
|
||||
distdir : $(DISTFILES)
|
||||
distdir : gperf.1-update $(DISTFILES)
|
||||
for file in $(DISTFILES); do \
|
||||
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
|
||||
cp -p $$dir/$$file '$(distdir)'/$$file || exit 1; \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dnl autoconf configuration for gperf/doc
|
||||
|
||||
dnl Copyright (C) 1998, 2000, 2002-2003, 2007, 2009 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1998, 2000, 2002-2003, 2007, 2009, 2012 Free Software Foundation, Inc.
|
||||
dnl Written by Douglas C. Schmidt <schmidt@ics.uci.edu>
|
||||
dnl and Bruno Haible <bruno@clisp.org>.
|
||||
dnl
|
||||
@@ -20,7 +20,7 @@ dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT([gperf.1])
|
||||
AC_INIT([gperf.texi])
|
||||
PACKAGE=gperf
|
||||
AC_SUBST([PACKAGE])
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
216
doc/gperf.1
216
doc/gperf.1
@@ -1,216 +0,0 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
||||
.TH GPERF "1" "February 2009" "GNU gperf 3.0.4" 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.
|
||||
.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 ",".
|
||||
.TP
|
||||
\fB\-t\fR, \fB\-\-struct\-type\fR
|
||||
Allows the user to include a structured type
|
||||
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
|
||||
Generates code in the specified language. Languages
|
||||
handled are currently C++, ANSI-C, C, and KR-C. The
|
||||
default is C.
|
||||
.SS "Details in the output code:"
|
||||
.TP
|
||||
\fB\-K\fR, \fB\-\-slot\-name\fR=\fINAME\fR
|
||||
Select name of the keyword component in the keyword
|
||||
structure.
|
||||
.TP
|
||||
\fB\-F\fR, \fB\-\-initializer\-suffix\fR=\fIINITIALIZERS\fR
|
||||
Initializers for additional components in the keyword
|
||||
structure.
|
||||
.TP
|
||||
\fB\-H\fR, \fB\-\-hash\-function\-name\fR=\fINAME\fR
|
||||
Specify name of generated hash function. Default is
|
||||
\&'hash'.
|
||||
.TP
|
||||
\fB\-N\fR, \fB\-\-lookup\-function\-name\fR=\fINAME\fR
|
||||
Specify name of generated lookup function. Default
|
||||
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'.
|
||||
.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.
|
||||
.TP
|
||||
\fB\-C\fR, \fB\-\-readonly\-tables\fR
|
||||
Make the contents of generated lookup tables
|
||||
constant, i.e., readonly.
|
||||
.TP
|
||||
\fB\-E\fR, \fB\-\-enum\fR
|
||||
Define constant values using an enum local to the
|
||||
lookup function rather than with defines.
|
||||
.TP
|
||||
\fB\-I\fR, \fB\-\-includes\fR
|
||||
Include the necessary system include file <string.h>
|
||||
at the beginning of the code.
|
||||
.TP
|
||||
\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'.
|
||||
.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
|
||||
statement scheme, rather than an array lookup table.
|
||||
This can lead to a reduction in both time and space
|
||||
requirements for some keyfiles. The COUNT argument
|
||||
determines how many switch statements are generated.
|
||||
A value of 1 generates 1 switch containing all the
|
||||
elements, a value of 2 generates 2 tables with 1/2
|
||||
the elements in each table, etc. If COUNT is very
|
||||
large, say 1000000, the generated C code does a
|
||||
binary search.
|
||||
.TP
|
||||
\fB\-T\fR, \fB\-\-omit\-struct\-type\fR
|
||||
Prevents the transfer of the type declaration to the
|
||||
output file. Use this option if the type is already
|
||||
defined elsewhere.
|
||||
.SS "Algorithm employed by gperf:"
|
||||
.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-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.,
|
||||
$,1,2,4,6-10.
|
||||
.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\-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
|
||||
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
|
||||
the associated character value upon collisions. Must
|
||||
be an odd number, default is 5.
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-no\-strlen\fR
|
||||
Do not include the length of the keyword when
|
||||
computing the hash function.
|
||||
.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,
|
||||
in relationship to the number of keys, e.g. a value
|
||||
of 3 means "allow the maximum associated value to
|
||||
be about 3 times larger than the number of input
|
||||
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
|
||||
decrease the time required for an unsuccessful
|
||||
search, at the expense of extra table space. Default
|
||||
value is 1.
|
||||
.SS "Informative output:"
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print this message.
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
Print the gperf version number.
|
||||
.TP
|
||||
\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-gperf@gnu.org>.
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 1989-1998, 2000-2004, 2006-2007, 2009 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
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B gperf
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info gperf
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
Reference in New Issue
Block a user