diff options
author | Gulliver <gulliver@fargonauten.de> | 2014-09-11 20:31:59 +0200 |
---|---|---|
committer | Gulliver <gulliver@fargonauten.de> | 2014-09-22 22:48:29 +0200 |
commit | 7e0b564af9ea4aaa35feced8c6fda6a97c7f8948 (patch) | |
tree | e7af742d230db039683ab752fbce136669c5eccc /src/references.h | |
parent | 3e16b871d17f812be1226c23fffbbecbe52876b0 (diff) |
using only includes from system
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 |