diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2000-02-23 00:27:55 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2000-02-23 00:27:55 +0000 |
commit | fbf761dfc1ee5f7f5f294a6716dbaea20a039407 (patch) | |
tree | 1e4a52e3057e1965fb4bef503422f27d52fab557 /apps | |
parent | 1d48280556958b7d131b751f112dd6c104000e2d (diff) | |
download | ATCD-fbf761dfc1ee5f7f5f294a6716dbaea20a039407.tar.gz |
ChangeLogTag:Tue Feb 22 17:42:09 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gperf/ChangeLog | 11 | ||||
-rw-r--r-- | apps/gperf/src/Bool_Array.cpp | 8 | ||||
-rw-r--r-- | apps/gperf/src/Gen_Perf.cpp | 12 | ||||
-rw-r--r-- | apps/gperf/src/Hash_Table.cpp | 2 | ||||
-rw-r--r-- | apps/gperf/src/Key_List.cpp | 20 | ||||
-rw-r--r-- | apps/gperf/src/Options.cpp | 8 | ||||
-rw-r--r-- | apps/gperf/src/Options.h | 2 |
7 files changed, 37 insertions, 26 deletions
diff --git a/apps/gperf/ChangeLog b/apps/gperf/ChangeLog index 6319de0b63d..53dbc1b091e 100644 --- a/apps/gperf/ChangeLog +++ b/apps/gperf/ChangeLog @@ -1,3 +1,14 @@ +Tue Feb 22 18:25:02 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * src/Key_List.cpp, + src/Bool_Array.cpp, + src/Gen_Perf.cpp, + src/Hash_Table.cpp, + src/Options.h, + src/Options.cpp: Renamed the DEBUG enum to DEBUGGING enum + to avoid problems with -DDEBUG is enabled. Thanks to + Tobin Bergen-Hill <tbhill@dctd.saic.com> for reporting this. + Sat Nov 13 18:43:53 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> * src/Key_List.cpp: The code for output_lookup_function() was diff --git a/apps/gperf/src/Bool_Array.cpp b/apps/gperf/src/Bool_Array.cpp index 926c9bc2ecd..fa14f8a1930 100644 --- a/apps/gperf/src/Bool_Array.cpp +++ b/apps/gperf/src/Bool_Array.cpp @@ -33,7 +33,7 @@ ACE_RCSID(src, Bool_Array, "$Id$") Bool_Array::~Bool_Array (void) { - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "\ndumping boolean array information\n" "size = %u\niteration number = %u\nend of array dump\n", @@ -63,7 +63,7 @@ Bool_Array::open (u_long s) 0, s * sizeof *storage_array_); - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "\nbool array size = %u, total bytes = %u\n", size_, @@ -88,7 +88,7 @@ Bool_Array::reset (void) { if (++generation_number_ == 0) { - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "(re-initializing bool_array)...")); @@ -96,7 +96,7 @@ Bool_Array::reset (void) ACE_OS::memset (storage_array_, 0, size_ * sizeof *storage_array_); - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "done\n")); } diff --git a/apps/gperf/src/Gen_Perf.cpp b/apps/gperf/src/Gen_Perf.cpp index 81458b44397..a946421a80d 100644 --- a/apps/gperf/src/Gen_Perf.cpp +++ b/apps/gperf/src/Gen_Perf.cpp @@ -162,7 +162,7 @@ Gen_Perf::affects_prev (char c, List_Node *curr) if (ptr == curr) { fewest_collisions = collisions; - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "- resolved after %d iterations", total_iterations - i)); @@ -181,7 +181,7 @@ Gen_Perf::affects_prev (char c, List_Node *curr) int Gen_Perf::change (List_Node *prior, List_Node *curr) { - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "collision on keyword #%d, prior = \"%s\", curr = \"%s\" hash = %d\n", num_done, @@ -200,7 +200,7 @@ Gen_Perf::change (List_Node *prior, List_Node *curr) for (char *temp = union_set; *temp != '\0'; temp++) if (affects_prev (*temp, curr) == 0) { - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, " by changing asso_value['%c'] (char #%d) to %d\n", *temp, @@ -217,7 +217,7 @@ Gen_Perf::change (List_Node *prior, List_Node *curr) this->hash (curr); - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "** collision not resolved after %d iterations, %d duplicates remain, continuing...\n", !option[FAST] ? option.asso_max () : option.iterations () ? option.iterations () : this->key_list.keyword_list_length (), @@ -282,7 +282,7 @@ Gen_Perf::open (void) version_string); Options::print_options (); - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "total non-linked keys = %d\n" "total duplicates = %d\n" @@ -432,7 +432,7 @@ Gen_Perf::run (void) Gen_Perf::~Gen_Perf (void) { - if (option[DEBUG]) + if (option[DEBUGGING]) { ACE_DEBUG ((LM_DEBUG, "\ndumping occurrence and associated values tables\n")); diff --git a/apps/gperf/src/Hash_Table.cpp b/apps/gperf/src/Hash_Table.cpp index c66b0b4f948..04f3a403339 100644 --- a/apps/gperf/src/Hash_Table.cpp +++ b/apps/gperf/src/Hash_Table.cpp @@ -50,7 +50,7 @@ Hash_Table::Hash_Table (size_t s) Hash_Table::~Hash_Table (void) { - if (option[DEBUG]) + if (option[DEBUGGING]) { u_int keysig_width = option.max_keysig_size () > ACE_OS::strlen ("keysig") ? option.max_keysig_size () diff --git a/apps/gperf/src/Key_List.cpp b/apps/gperf/src/Key_List.cpp index a6d8753d256..54ae68dc822 100644 --- a/apps/gperf/src/Key_List.cpp +++ b/apps/gperf/src/Key_List.cpp @@ -45,7 +45,7 @@ int Key_List::determined_[ACE_STANDARD_CHARACTER_SET_SIZE]; Key_List::~Key_List (void) { - if (option[DEBUG]) + if (option[DEBUGGING]) this->dump (); // Free up all the nodes in the list. @@ -303,7 +303,7 @@ Key_List::read_keys (void) // Complain if user hasn't enabled the duplicate // option. - if (!option[DUP] || option[DEBUG]) + if (!option[DUP] || option[DEBUGGING]) ACE_ERROR ((LM_ERROR, "Key link: \"%s\" = \"%s\", with key set \"%s\".\n", temp->key, @@ -628,7 +628,7 @@ Key_List::output_switch (int use_keyword_table) if (temp->link == 0) { - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_OS::printf (" /* hash value = %4d, keyword = \"%s\" */\n", temp->hash_value, temp->key); @@ -639,7 +639,7 @@ Key_List::output_switch (int use_keyword_table) for (links = temp; links; links = links->link) { - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_OS::printf (" /* hash value = %4d, keyword = \"%s\" */\n", temp->hash_value, links->key); @@ -842,7 +842,7 @@ Key_List::output_keyword_table (void) else { ACE_OS::printf ("%s\"%s\", %s%s", l_brace, temp->key, temp->rest, r_brace); - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_OS::printf (" /* hash value = %d, slot = %d */", temp->hash_value, temp->slot); @@ -852,7 +852,7 @@ Key_List::output_keyword_table (void) } ACE_OS::printf (" %s\"%s\", %s%s", l_brace, temp->key, temp->rest, r_brace); - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_OS::printf (" /* hash value = %d, slot = %d */", temp->hash_value, temp->slot); @@ -864,7 +864,7 @@ Key_List::output_keyword_table (void) { links->slot = ++slot; ACE_OS::printf (" %s\"%s\", %s%s", l_brace, links->key, links->rest, r_brace); - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_OS::printf (" /* hash value = %d, slot = %d */", links->hash_value, links->slot); @@ -1283,7 +1283,7 @@ Key_List::count_duplicates (List_Node *link, { count++; - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "%s linked keyword = %s, slot = %d, hash_value = %d\n", type, @@ -1345,7 +1345,7 @@ Key_List::output_lookup_array (void) // keyword. lookup_array[hash_value] = temp->slot; - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "keyword = %s, slot = %d, hash_value = %d, lookup_array[hash_value] = %d\n", temp->key, @@ -1386,7 +1386,7 @@ Key_List::output_lookup_array (void) // Compute the values in the lookup array. while (--dup_ptr >= duplicates) { - if (option[DEBUG]) + if (option[DEBUGGING]) ACE_DEBUG ((LM_DEBUG, "dup_ptr[%d]: hash_value = %d, slot = %d, count = %d\n", dup_ptr - duplicates, diff --git a/apps/gperf/src/Options.cpp b/apps/gperf/src/Options.cpp index 27c75b9f6be..9ca3d74f9bf 100644 --- a/apps/gperf/src/Options.cpp +++ b/apps/gperf/src/Options.cpp @@ -156,13 +156,13 @@ Options::Options (void) Options::~Options (void) { - if (ACE_BIT_ENABLED (option_word_, DEBUG)) + if (ACE_BIT_ENABLED (option_word_, DEBUGGING)) { char *ptr; ACE_OS::fprintf (stderr, "\ndumping Options:" - "\nDEBUG is.......: %s" + "\nDEBUGGING is...: %s" "\nORDER is.......: %s" "\nANSI is........: %s" "\nTYPE is........: %s" @@ -197,7 +197,7 @@ Options::~Options (void) "\ndelimiters = %s" "\nnumber of switch statements = %d" "\n", - ACE_BIT_ENABLED (option_word_, DEBUG) ? "enabled" : "disabled", + ACE_BIT_ENABLED (option_word_, DEBUGGING) ? "enabled" : "disabled", ACE_BIT_ENABLED (option_word_, ORDER) ? "enabled" : "disabled", ACE_BIT_ENABLED (option_word_, ANSI) ? "enabled" : "disabled", ACE_BIT_ENABLED (option_word_, TYPE) ? "enabled" : "disabled", @@ -301,7 +301,7 @@ Options::parse_args (int argc, char *argv[]) // Enable debugging option. case 'd': { - ACE_SET_BITS (option_word_, DEBUG); + ACE_SET_BITS (option_word_, DEBUGGING); ACE_ERROR ((LM_ERROR, "Starting program %n, version %s, with debuggin on.\n", version_string)); diff --git a/apps/gperf/src/Options.h b/apps/gperf/src/Options.h index 88962561038..783c1304663 100644 --- a/apps/gperf/src/Options.h +++ b/apps/gperf/src/Options.h @@ -36,7 +36,7 @@ enum Option_Type { - DEBUG = 01, // Enable debugging (prints diagnostics to stderr). + DEBUGGING = 01, // Enable debugging (prints diagnostics to stderr). ORDER = 02, // Apply ordering heuristic to speed-up search time. ANSI = 04, // Generate ANSI prototypes. ALLCHARS = 010, // Use all characters in hash function. |