summaryrefslogtreecommitdiff
path: root/src/references.h
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-29 22:59:46 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-29 22:59:46 -0700
commitd9f7581443bd786e7d17532f6678efd2ee77c26f (patch)
tree831a33dc8990e3b85ea068b361750702f8e3f40a /src/references.h
parentde1e28217f0da80b928bca0ca09541c0401314ee (diff)
parentc006aececef112f61dd44cad43f0596221f29700 (diff)
Merge branch 'master' into newemphasis
Conflicts: Makefile js/stmd.js
Diffstat (limited to 'src/references.h')
-rw-r--r--src/references.h27
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