addht.3alc man page

addht — create an hash table

Synopsis

#include "mut.h"
ht ∗addht(len)
unsigned int len;

Parameter

len

Number of entries in the hash table

Description

addht() creates a new hash table in memory. len is an estimate of the maximum number of entries that the table will contain. This number may be automatically adjusted when using access functions by a dynamic reallocation, in order to warranty fast access time.

Example

#include "mut.h"
ht ∗sigHtable(ptfig) /∗ h table suitable for signals ∗/
lofig_list ∗ptfig;
{
losig_list ∗ptsig = ptfig->LOSIG;
unsigned int i = 0;
	while (ptsig) {
		i++;
		ptsig = ptsig->NEXT;
	}
	return addht(i);
}

Error

"∗∗∗ mbk error ∗∗∗ illegal addht : len is '0'"

The hash table size cannot be zero, guess why!

See Also

mbk(1), delht(3), addhtitem(3), gethtitem(3), sethtitem(3), delhtitem(3), viewht(3).

Referenced By

addhtitem.3alc(3), delht.3alc(3), gethtitem.3alc(3), sethtitem.3alc(3), viewht.3alc(3).

October 1, 1997 ASIM/LIP6 MBK HASH TABLE MANAGEMENT FUNCTIONS