aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-11-17 21:26:36 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-17 21:43:47 -0800
commit2c7b83042fea3c970e5b1a1914880bc60acf6174 (patch)
tree9418f5d28f1689555b98f1986ae42bc8c98d4cbd
parent4cf3275ee16255a8fa9a5c3e290a152d1705fc3a (diff)
Move reference type definitions to reference.h
-rw-r--r--src/ast.h17
-rw-r--r--src/references.h18
2 files changed, 18 insertions, 17 deletions
diff --git a/src/ast.h b/src/ast.h
index bd9b342..c1636de 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -12,25 +12,8 @@
extern "C" {
#endif
-#define REFMAP_SIZE 16
#define MAX_LINK_LABEL_LENGTH 1000
-struct cmark_reference {
- struct cmark_reference *next;
- unsigned char *label;
- unsigned char *url;
- unsigned char *title;
- unsigned int hash;
-};
-
-typedef struct cmark_reference cmark_reference;
-
-struct cmark_reference_map {
- cmark_reference *table[REFMAP_SIZE];
-};
-
-typedef struct cmark_reference_map cmark_reference_map;
-
struct cmark_doc_parser {
struct cmark_reference_map *refmap;
struct cmark_node* root;
diff --git a/src/references.h b/src/references.h
index 9f423ab..e3824e7 100644
--- a/src/references.h
+++ b/src/references.h
@@ -8,6 +8,24 @@
extern "C" {
#endif
+#define REFMAP_SIZE 16
+
+struct cmark_reference {
+ struct cmark_reference *next;
+ unsigned char *label;
+ unsigned char *url;
+ unsigned char *title;
+ unsigned int hash;
+};
+
+typedef struct cmark_reference cmark_reference;
+
+struct cmark_reference_map {
+ cmark_reference *table[REFMAP_SIZE];
+};
+
+typedef struct cmark_reference_map cmark_reference_map;
+
cmark_reference_map *cmark_reference_map_new(void);
void cmark_reference_map_free(cmark_reference_map *map);
cmark_reference* cmark_reference_lookup(cmark_reference_map *map, cmark_chunk *label);