Branch: Tag:

2016-07-14

2016-07-14 20:21:42 by Martin Nilsson <nilsson@fastmail.com>

Reduce hashtable to the actually used bits.

57:   /*    * create a new, empty hashable   */ - struct hash_table *create_hash_table(void) + static struct hash_table *create_hash_table(void)   {    struct hash_table *new;    new=calloc(1, sizeof(struct hash_table)+
70:   /*    * rehash - ugh    */ - struct hash_table *hash_rehash(struct hash_table *h,int size) + static struct hash_table *hash_rehash(struct hash_table *h,int size)   {    struct hash_table *new;    int e;
139:    return h;   }    - void map_hashtable(struct hash_table *h, void (*fun)(struct hash_entry *)) - { -  INT32 e; -  struct hash_entry *i, *n; -  for(e=0;e<=h->mask;e++) -  { -  for(i=h->htable[e];i;i=n) -  { -  n=i->next; -  fun(i); -  } -  } - } -  +    void free_hashtable(struct hash_table *h,    void (*free_entry)(struct hash_entry *))   {