From 7e0b564af9ea4aaa35feced8c6fda6a97c7f8948 Mon Sep 17 00:00:00 2001 From: Gulliver Date: Thu, 11 Sep 2014 20:31:59 +0200 Subject: using only includes from system --- src/references.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/references.h (limited to 'src/references.h') diff --git a/src/references.h b/src/references.h new file mode 100644 index 0000000..28937f1 --- /dev/null +++ b/src/references.h @@ -0,0 +1,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 -- cgit v1.2.3