FACT++  1.0
void dis_print_hash_table ( )

Definition at line 3007 of file dis_old.c.

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

3008 {
3009  SERVICE *servp;
3010  int i;
3011  int n_entries, max_entry_index = 0;
3012  int max_entries = 0;
3013 
3014  for( i = 0; i < MAX_HASH_ENTRIES; i++ )
3015  {
3016  n_entries = 0;
3017  servp = Service_hash_table[i];
3018  while( (servp = (SERVICE *) dll_get_next(
3019  (DLL *) Service_hash_table[i],
3020  (DLL *) servp)) )
3021  {
3022  n_entries++;
3023  if(n_entries == 1)
3024  printf(" Name = %s\n",servp->name);
3025  }
3026  if(n_entries != 0)
3027  printf("HASH[%d] - %d entries\n", i, n_entries);
3028  if(n_entries > max_entries)
3029  {
3030  max_entries = n_entries;
3031  max_entry_index = i;
3032  }
3033  }
3034  printf("Maximum : HASH[%d] - %d entries\n", max_entry_index, max_entries);
3035  fflush(stdout);
3036 }
int i
Definition: db_dim_client.c:21
char name[MAX_NAME]
Definition: dis.c:72
#define MAX_HASH_ENTRIES
Definition: dis_old.c:2856
static SERVICE * Service_hash_table[MAX_HASH_ENTRIES]
Definition: dis_old.c:2858
Definition: dim.h:530
Definition: dis.c:69
DLL * dll_get_next(DLL *head, DLL *item)
Definition: dll.c:66

+ Here is the call graph for this function: