cmark
My personal build of CMark ✏️
references.h (1010B)
1 #ifndef CMARK_REFERENCES_H 2 #define CMARK_REFERENCES_H 3 4 #include "chunk.h" 5 6 #ifdef __cplusplus 7 extern "C" { 8 #endif 9 10 struct cmark_reference { 11 struct cmark_reference *next; 12 unsigned char *label; 13 unsigned char *url; 14 unsigned char *title; 15 unsigned int age; 16 unsigned int size; 17 }; 18 19 typedef struct cmark_reference cmark_reference; 20 21 struct cmark_reference_map { 22 cmark_mem *mem; 23 cmark_reference *refs; 24 cmark_reference **sorted; 25 unsigned int size; 26 unsigned int ref_size; 27 unsigned int max_ref_size; 28 }; 29 30 typedef struct cmark_reference_map cmark_reference_map; 31 32 cmark_reference_map *cmark_reference_map_new(cmark_mem *mem); 33 void cmark_reference_map_free(cmark_reference_map *map); 34 cmark_reference *cmark_reference_lookup(cmark_reference_map *map, 35 cmark_chunk *label); 36 extern void cmark_reference_create(cmark_reference_map *map, cmark_chunk *label, 37 cmark_chunk *url, cmark_chunk *title); 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif