diff options
author | Kārlis Gaņģis <Knagis@users.noreply.github.com> | 2014-10-08 11:02:43 +0300 |
---|---|---|
committer | Kārlis Gaņģis <Knagis@users.noreply.github.com> | 2014-10-08 11:02:43 +0300 |
commit | 43b8646d444d6828014bdd38df956f5871d60efe (patch) | |
tree | 66a1b9f6bd38822ee0c01a097ba7465157a5480c /src/references.h | |
parent | 3567b844ca1fd7bec62801f8758545f7bd5cbaae (diff) | |
parent | daeb55edc7636deebc2a79621ea06c3548d67827 (diff) |
Merge pull request #1 from jgm/master
merge
Diffstat (limited to 'src/references.h')
-rw-r--r-- | src/references.h | 27 |
1 files changed, 27 insertions, 0 deletions
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 |