@@ -58,7 +58,7 @@ typedef struct Hash_Table * Hash_TableP;
5858Address SC_HASHhash ( char *, Hash_TableP );
5959static void SC_HASHexpand_table ( Hash_TableP );
6060
61- # if HASH_STATISTICS
61+ # ifdef HASH_STATISTICS
6262static long HashAccesses, HashCollisions;
6363# endif
6464
@@ -124,15 +124,15 @@ SC_HASHcreate( unsigned count ) {
124124 table->maxp = MUL ( count, SEGMENT_SIZE );
125125 table->MinLoadFactor = 1 ;
126126 table->MaxLoadFactor = MAX_LOAD_FACTOR;
127- # if DEBUG
127+ # ifdef DEBUG
128128 fprintf ( stderr,
129129 " [HASHcreate] table %x count %d maxp %d SegmentCount %d\n " ,
130130 table,
131131 count,
132132 table->maxp ,
133133 table->SegmentCount );
134134# endif
135- # if HASH_STATISTICS
135+ # ifdef HASH_STATISTICS
136136 HashAccesses = HashCollisions = 0 ;
137137# endif
138138 return ( table );
@@ -225,7 +225,7 @@ SC_HASHdestroy( Hash_TableP table ) {
225225 }
226226 }
227227 SC_HASH_Table_destroy ( table );
228- # if HASH_STATISTICS && DEBUG
228+ # if defined( HASH_STATISTICS) && defined( DEBUG)
229229 fprintf ( stderr,
230230 " [hdestroy] Accesses %ld Collisions %ld\n " ,
231231 HashAccesses,
@@ -244,7 +244,7 @@ SC_HASHsearch( Hash_TableP table, const struct Element * item, Action action ) {
244244 struct Element * q;
245245 struct Element * deleteme;
246246
247- # if HASH_STATISTICS
247+ # ifdef HASH_STATISTICS
248248 HashAccesses++;
249249# endif
250250 h = SC_HASHhash ( item->key , table );
@@ -265,7 +265,7 @@ SC_HASHsearch( Hash_TableP table, const struct Element * item, Action action ) {
265265 while ( q != NULL && strcmp ( q->key , item->key ) ) {
266266 p = &q->next ;
267267 q = *p;
268- # if HASH_STATISTICS
268+ # ifdef HASH_STATISTICS
269269 HashCollisions++;
270270# endif
271271 }
0 commit comments