mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Slightly reorganize command line options help.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2002-11-16 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* doc/gperf.texi: Move description of option -l from section
|
||||
Algorithmic Details to section Output Details.
|
||||
* src/options.cc (Options::long_usage): Likewise.
|
||||
* tests/test-6.exp: Update.
|
||||
|
||||
2002-11-12 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* src/options.h (Output::get_output_file_name): New method.
|
||||
|
||||
@@ -683,6 +683,17 @@ test like @samp{c >= 'A' && c <= 'Z'} guarantees this.) This was the
|
||||
default in versions of @code{gperf} earlier than 2.7; now the default is
|
||||
to support 8-bit and multibyte characters.
|
||||
|
||||
@item -l
|
||||
@itemx --compare-strlen
|
||||
Compare keyword lengths before trying a string comparison. This option
|
||||
is mandatory for binary comparisons (@pxref{Binary Strings}). It also might
|
||||
cut down on the number of string comparisons made during the lookup, since
|
||||
keywords with different lengths are never compared via @code{strcmp}.
|
||||
However, using @samp{-l} might greatly increase the size of the
|
||||
generated C code if the lookup table range is large (which implies that
|
||||
the switch option @samp{-S} is not enabled), since the length table
|
||||
contains as many elements as there are entries in the lookup table.
|
||||
|
||||
@item -c
|
||||
@itemx --compare-strncmp
|
||||
Generates C code that uses the @code{strncmp} function to perform
|
||||
@@ -767,17 +778,6 @@ with length less than the indicated byte positions work properly, since
|
||||
selected byte positions exceeding the keyword length are simply not
|
||||
referenced in the hash function.
|
||||
|
||||
@item -l
|
||||
@itemx --compare-strlen
|
||||
Compare keyword lengths before trying a string comparison. This might cut
|
||||
down on the number of string comparisons made during the lookup, since
|
||||
keywords with different lengths are never compared via @code{strcmp}.
|
||||
However, using @samp{-l} might greatly increase the size of the
|
||||
generated C code if the lookup table range is large (which implies that
|
||||
the switch option @samp{-S} is not enabled), since the length table
|
||||
contains as many elements as there are entries in the lookup table.
|
||||
This option is mandatory for binary comparisons (@pxref{Binary Strings}).
|
||||
|
||||
@item -D
|
||||
@itemx --duplicates
|
||||
@cindex Duplicates
|
||||
|
||||
@@ -137,6 +137,11 @@ Options::long_usage (FILE * stream) const
|
||||
" 'Perfect_Hash'.\n");
|
||||
fprintf (stream,
|
||||
" -7, --seven-bit Assume 7-bit characters.\n");
|
||||
fprintf (stream,
|
||||
" -l, --compare-strlen Compare key lengths before trying a string\n"
|
||||
" comparison. This is necessary if the keywords\n"
|
||||
" contain NUL bytes. It also helps cut down on the\n"
|
||||
" number of string comparisons made during the lookup.\n");
|
||||
fprintf (stream,
|
||||
" -c, --compare-strncmp Generate comparison code using strncmp rather than\n"
|
||||
" strcmp.\n");
|
||||
@@ -187,10 +192,6 @@ Options::long_usage (FILE * stream) const
|
||||
" indicates the \"final character\" of a key, e.g.,\n"
|
||||
" $,1,2,4,6-10.\n",
|
||||
Positions::MAX_KEY_POS);
|
||||
fprintf (stream,
|
||||
" -l, --compare-strlen Compare key lengths before trying a string\n"
|
||||
" comparison. This helps cut down on the number of\n"
|
||||
" string comparisons made during the lookup.\n");
|
||||
fprintf (stream,
|
||||
" -D, --duplicates Handle keywords that hash to duplicate values. This\n"
|
||||
" is useful for certain highly redundant keyword sets.\n");
|
||||
|
||||
@@ -42,6 +42,10 @@ Details in the output code:
|
||||
-Z, --class-name=NAME Specify name of generated C++ class. Default name is
|
||||
'Perfect_Hash'.
|
||||
-7, --seven-bit Assume 7-bit characters.
|
||||
-l, --compare-strlen 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.
|
||||
-c, --compare-strncmp Generate comparison code using strncmp rather than
|
||||
strcmp.
|
||||
-C, --readonly-tables Make the contents of generated lookup tables
|
||||
@@ -81,9 +85,6 @@ Algorithm employed by gperf:
|
||||
hash function to consider ALL key positions, and $
|
||||
indicates the "final character" of a key, e.g.,
|
||||
$,1,2,4,6-10.
|
||||
-l, --compare-strlen Compare key lengths before trying a string
|
||||
comparison. This helps cut down on the number of
|
||||
string comparisons made during the lookup.
|
||||
-D, --duplicates Handle keywords that hash to duplicate values. This
|
||||
is useful for certain highly redundant keyword sets.
|
||||
-f, --fast=ITERATIONS Generate the gen-perf.hash function "fast". This
|
||||
|
||||
Reference in New Issue
Block a user