FACT++  1.0
void dis_print_hash_table ( )

Definition at line 3405 of file dis.c.

References dll_get_next(), i, MAX_HASH_ENTRIES, and serv::name.

3406 {
3407  SERVICE *servp;
3408  int i;
3409  int n_entries, max_entry_index = 0;
3410  int max_entries = 0;
3411 
3412  for( i = 0; i < MAX_HASH_ENTRIES; i++ )
3413  {
3414  n_entries = 0;
3415  servp = Service_hash_table[i];
3416  while( (servp = (SERVICE *) dll_get_next(
3417  (DLL *) Service_hash_table[i],
3418  (DLL *) servp)) )
3419  {
3420  n_entries++;
3421  if(n_entries == 1)
3422  printf(" Name = %s\n",servp->name);
3423  }
3424  if(n_entries != 0)
3425  printf("HASH[%d] - %d entries\n", i, n_entries);
3426  if(n_entries > max_entries)
3427  {
3428  max_entries = n_entries;
3429  max_entry_index = i;
3430  }
3431  }
3432  printf("Maximum : HASH[%d] - %d entries\n", max_entry_index, max_entries);
3433  fflush(stdout);
3434 }
#define MAX_HASH_ENTRIES
Definition: dis.c:3231
int i
Definition: db_dim_client.c:21
char name[MAX_NAME]
Definition: dis.c:72
Definition: dim.h:530
Definition: dis.c:69
static SERVICE * Service_hash_table[MAX_HASH_ENTRIES]
Definition: dis.c:3233
DLL * dll_get_next(DLL *head, DLL *item)
Definition: dll.c:66

+ Here is the call graph for this function: