summaryrefslogtreecommitdiff
path: root/ht.h
blob: 5aaffe7bfaac44914d2f5fdbaf257314587d5600 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef _ht_h
#define _ht_h

#define HT_SIZE 128

typedef struct {
	char *k;
	int v;
} HtEntry;

typedef struct {
	int len;
	HtEntry b[HT_SIZE];
} Ht;

typedef Ht Env;

Ht ht_new();
void ht_put(Ht *h, char *k, int v);
int ht_get(Ht *h, char *k, int *v);

#endif