summaryrefslogtreecommitdiff
path: root/src/references.h
blob: 28937f1a66e5beae93193636b29c5ffdfa827625 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef _REFERENCES_H_
#define _REFERENCES_H_

#define REFMAP_SIZE 16

struct reference {
	struct reference *next;
	unsigned char *label;
	unsigned char *url;
	unsigned char *title;
	unsigned int hash;
};

typedef struct reference reference;

struct reference_map {
	reference *table[REFMAP_SIZE];
};

typedef struct reference_map reference_map;

reference_map *reference_map_new(void);
void reference_map_free(reference_map *map);
reference* reference_lookup(reference_map *map, chunk *label);
extern void reference_create(reference_map *map, chunk *label, chunk *url, chunk *title);

#endif