diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-28 18:24:34 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-28 18:24:34 +0000 |
commit | f47c335d32c3969710918933033e1a8ebf00614d (patch) | |
tree | a608e84ec1f550dad8c568e12c5397f582e785be /apps/gperf | |
parent | 3acfecfc0eb4454e42c581fe656b5a724b620102 (diff) | |
download | ATCD-f47c335d32c3969710918933033e1a8ebf00614d.tar.gz |
.
Diffstat (limited to 'apps/gperf')
-rw-r--r-- | apps/gperf/ChangeLog | 6 | ||||
-rw-r--r-- | apps/gperf/src/Key_List.cpp | 2 | ||||
-rw-r--r-- | apps/gperf/tests/test-1.exp | 4 | ||||
-rw-r--r-- | apps/gperf/tests/test-2.exp | 4 | ||||
-rw-r--r-- | apps/gperf/tests/test-3.exp | 8 | ||||
-rw-r--r-- | apps/gperf/tests/test-4.exp | 2 | ||||
-rw-r--r-- | apps/gperf/tests/test-5.exp | 2 |
7 files changed, 17 insertions, 11 deletions
diff --git a/apps/gperf/ChangeLog b/apps/gperf/ChangeLog index ea61dc8a34a..b0cb7326412 100644 --- a/apps/gperf/ChangeLog +++ b/apps/gperf/ChangeLog @@ -1,5 +1,11 @@ Mon Sep 28 13:18:05 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + * tests: Updated all the test-*.exp files to reflect the + latest "unsigned" changes. + + * src/Key_List.cpp (output_hash_function): Fixed another use of + int to be unsigned int. + * tests/test.cpp: Fixed the signature of in_word_set() to be consistent with the new gperf. Thanks to David Levine and Carlos O'Ryan for this fix. diff --git a/apps/gperf/src/Key_List.cpp b/apps/gperf/src/Key_List.cpp index a1291735590..63333fe9deb 100644 --- a/apps/gperf/src/Key_List.cpp +++ b/apps/gperf/src/Key_List.cpp @@ -937,7 +937,7 @@ Key_List::output_hash_function (void) // We've got to use the correct, but brute force, technique. else { - printf ("\n };\n int hval = %s;\n\n switch (%s)\n {\n default:\n", + printf ("\n };\n unsigned int hval = %s;\n\n switch (%s)\n {\n default:\n", option[NOLENGTH] ? "0" : "len", option[NOLENGTH] ? "len" : "hval"); // User wants *all* characters considered in hash. diff --git a/apps/gperf/tests/test-1.exp b/apps/gperf/tests/test-1.exp index ca018654cb7..ec19bd7dd3c 100644 --- a/apps/gperf/tests/test-1.exp +++ b/apps/gperf/tests/test-1.exp @@ -33,7 +33,7 @@ hash (str, len) 26, 30, 31, 83, 15, 1, 0, 28, 13, 4, 83, 83, 5, 83, 83, 83, 83, 83, }; - int hval = len; + unsigned int hval = len; switch (hval) { @@ -121,7 +121,7 @@ is_reserved_word (str, len) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - int key = hash (str, len); + unsigned int key = hash (str, len); if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) { diff --git a/apps/gperf/tests/test-2.exp b/apps/gperf/tests/test-2.exp index 4f0acb8df61..6533162bce4 100644 --- a/apps/gperf/tests/test-2.exp +++ b/apps/gperf/tests/test-2.exp @@ -31,7 +31,7 @@ hash (str, len) 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, }; - int hval = 0; + unsigned int hval = 0; switch (len) { @@ -169,7 +169,7 @@ in_word_set (str, len) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - int key = hash (str, len); + unsigned int key = hash (str, len); if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) { diff --git a/apps/gperf/tests/test-3.exp b/apps/gperf/tests/test-3.exp index 8d4d7c4bf41..85ce4665dc1 100644 --- a/apps/gperf/tests/test-3.exp +++ b/apps/gperf/tests/test-3.exp @@ -14,7 +14,7 @@ struct resword { char *name; short token; enum rid rid;}; inline static unsigned int -hash (const char *str, int len) +hash (const char *str, unsigned int len) { static const unsigned char asso_values[] = { @@ -32,7 +32,7 @@ hash (const char *str, int len) 20, 15, 42, 148, 31, 5, 26, 39, 32, 10, 148, 40, 148, 148, 148, 148, 148, 148, }; - int hval = len; + unsigned int hval = len; switch (hval) { @@ -49,7 +49,7 @@ hash (const char *str, int len) inline const struct resword * -in_word_set (const char *str, int len) +in_word_set (const char *str, unsigned int len) { static const struct resword wordlist[] = { @@ -152,7 +152,7 @@ in_word_set (const char *str, int len) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - int key = hash (str, len); + unsigned int key = hash (str, len); if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) { diff --git a/apps/gperf/tests/test-4.exp b/apps/gperf/tests/test-4.exp index 7f5d6b49ed8..40994a83069 100644 --- a/apps/gperf/tests/test-4.exp +++ b/apps/gperf/tests/test-4.exp @@ -109,7 +109,7 @@ in_word_set (str, len) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - int key = hash (str, len); + unsigned int key = hash (str, len); if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) { diff --git a/apps/gperf/tests/test-5.exp b/apps/gperf/tests/test-5.exp index 5ef01f8b481..c06ae1e988f 100644 --- a/apps/gperf/tests/test-5.exp +++ b/apps/gperf/tests/test-5.exp @@ -95,7 +95,7 @@ is_reserved_word (str, len) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - int key = hash (str, len); + unsigned int key = hash (str, len); if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) { |