aboutsummaryrefslogtreecommitdiff
path: root/include/htab.h
blob: 7ea173063c7ae0802847c5ff9538b0560ae8d2ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <search.h>

#ifndef HTAB_H

struct htab {
	struct hsearch_data *table;
	char **keys;
	size_t keys_size, key_filled;
};

void htab_free(struct htab *htab);
int htab_init(size_t nel, struct htab **htab);
int htab_delete(struct htab *htab, const char *key);
int htab_enter(struct htab *htab, const char *key, void *data);
int htab_search(struct htab *htab, char *key, ENTRY **ep);

#define HTAB_H
#endif