Exemplo n.º 1
0
Arquivo: hss.c Projeto: indera/miller
// ----------------------------------------------------------------
static void hss_enlarge(hss_t* pset) {
	int old_array_length = pset->array_length;
	hsse_t* old_array = pset->array;

	hss_init(pset, pset->array_length*2);

	for (int index = 0; index < old_array_length; index++) {
		hsse_t e = old_array[index];
		if (e.state == OCCUPIED)
			hss_add(pset, e.key);
	}
}
Exemplo n.º 2
0
hss_t* hss_alloc() {
	hss_t* pset = mlr_malloc_or_die(sizeof(hss_t));
	hss_init(pset, INITIAL_ARRAY_LENGTH);
	return pset;
}