summaryrefslogtreecommitdiff
path: root/apps/gperf
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-09 06:07:37 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-09 06:07:37 +0000
commitbdba4e8fc951385aab9c8964e902d4e1dca86d0b (patch)
treec1e8e9c8e58eac5119738d083834963a274ef415 /apps/gperf
parentb8179862e57f81b772d2268e1a300c32ab74ba8e (diff)
downloadATCD-bdba4e8fc951385aab9c8964e902d4e1dca86d0b.tar.gz
*** empty log message ***
Diffstat (limited to 'apps/gperf')
-rw-r--r--apps/gperf/src/Key_List.cpp12
-rw-r--r--apps/gperf/src/Options.cpp21
2 files changed, 16 insertions, 17 deletions
diff --git a/apps/gperf/src/Key_List.cpp b/apps/gperf/src/Key_List.cpp
index 06d0aaec03b..edae165fb38 100644
--- a/apps/gperf/src/Key_List.cpp
+++ b/apps/gperf/src/Key_List.cpp
@@ -883,7 +883,7 @@ Key_List::output_binary_search_function (void)
// Class definition if -M is *not* enabled.
if ((option[CPLUSPLUS]) && (!option[SKIPCLASS]))
printf ("class %s {\npublic:\n"
- " static %s%s%s (const char *str, unsigned int len);\n};\n\n",
+ " static %s%s%s (const char *str);\n};\n\n",
option.class_name (),
option[CONSTANT] ? "const " : "",
return_type,
@@ -898,8 +898,8 @@ Key_List::output_binary_search_function (void)
printf ("%s::", option.class_name ());
printf (option[ANSI]
- ? "%s (const char *str, unsigned int len)\n{\n"
- : "%s (str, len)\n char *str;\n unsigned int len;\n{\n",
+ ? "%s (const char *str)\n{\n"
+ : "%s (str)\n char *str;\n{\n",
option.function_name ());
// Use the switch in place of lookup table.
@@ -977,7 +977,7 @@ Key_List::output_linear_search_function (void)
// Class definition if -M is *not* enabled.
if ((option[CPLUSPLUS]) && (!option[SKIPCLASS]))
printf ("class %s {\npublic:\n"
- " static %s%s%s (const char *str, unsigned int len);\n};\n\n",
+ " static %s%s%s (const char *str);\n};\n\n",
option.class_name (),
option[CONSTANT] ? "const " : "",
return_type,
@@ -992,8 +992,8 @@ Key_List::output_linear_search_function (void)
printf ("%s::", option.class_name ());
printf (option[ANSI]
- ? "%s (const char *str, unsigned int len)\n{\n"
- : "%s (str, len)\n char *str;\n unsigned int len;\n{\n",
+ ? "%s (const char *str)\n{\n"
+ : "%s (str)\n char *str;\n{\n",
option.function_name ());
// Use the switch in place of lookup table.
diff --git a/apps/gperf/src/Options.cpp b/apps/gperf/src/Options.cpp
index 5a34c7f8158..21a51b5bacd 100644
--- a/apps/gperf/src/Options.cpp
+++ b/apps/gperf/src/Options.cpp
@@ -78,9 +78,9 @@ void
Options::usage (void)
{
ACE_ERROR ((LM_ERROR,
- "Usage: %n [-aBcCdDef[num]gGhH<hashname>i<init>IjJ"
+ "Usage: %n [-abBcCdDef[num]gGhH<hashname>i<init>IjJ"
"k<keys>K<keyname>lL<language>mMnN<function name>o"
- "Oprs<size>S<switches>tTvVZ<class name>z].\n"
+ "Oprs<size>S<switches>tTvVZ<class name>].\n"
"(type %n -h for help)\n"));
}
@@ -223,7 +223,7 @@ Options::parse_args (int argc, char *argv[])
if (ACE_LOG_MSG->open (argv[0]) == -1)
return -1;
- ACE_Get_Opt getopt (argc, argv, "aBcCdDe:Ef:gGhH:i:IJj:k:K:lL:mMnN:oOprs:S:tTvVZ:z");
+ ACE_Get_Opt getopt (argc, argv, "abBcCdDe:Ef:gGhH:i:IJj:k:K:lL:mMnN:oOprs:S:tTvVZ:");
int option_char;
argc_ = argc;
@@ -239,6 +239,12 @@ Options::parse_args (int argc, char *argv[])
ACE_SET_BITS (option_word_, ANSI);
break;
}
+ // Generate code for Linear Search.
+ case 'b':
+ {
+ ACE_SET_BITS (option_word_, LINEARSEARCH);
+ break;
+ }
// Generate code for Binary Search.
case 'B':
{
@@ -392,8 +398,7 @@ Options::parse_args (int argc, char *argv[])
"-v\tPrints out the current version number and exits with a value of 0\n"
"-V\tExits silently with a value of 0.\n"
"-Z\tAllow user to specify name of generated C++ class. Default\n"
- "\tname is `Perfect_Hash.'\n"
- "-z\tGenerates the code for linear search.\n",
+ "\tname is `Perfect_Hash.'\n",
DEFAULT_JUMP_VALUE,
MAX_KEY_POS - 1);
Options::usage ();
@@ -631,12 +636,6 @@ Options::parse_args (int argc, char *argv[])
class_name_ = getopt.optarg;
break;
}
- // Generate code for Linear Search.
- case 'z':
- {
- ACE_SET_BITS (option_word_, LINEARSEARCH);
- break;
- }
default:
ACE_ERROR_RETURN ((LM_ERROR,
"%r",