summaryrefslogtreecommitdiff
path: root/src/stmd.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2014-09-03 03:40:23 +0200
committerVicent Marti <tanoku@gmail.com>2014-09-09 03:39:15 +0200
commita7314deae649646f1f7ce5ede972641b5b62538c (patch)
treec958536337ab5cbc96d247725e0dd35fdc02b998 /src/stmd.h
parent7e12fdba0c9a444a3cfc29c520e2f2caa57a8232 (diff)
338/103
Diffstat (limited to 'src/stmd.h')
-rw-r--r--src/stmd.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/stmd.h b/src/stmd.h
index 3e284bd..4a3c399 100644
--- a/src/stmd.h
+++ b/src/stmd.h
@@ -1,17 +1,15 @@
+#ifndef _STDMD_H_
+#define _STDMD_H_
+
#include <stdbool.h>
#include <stdio.h>
#include "buffer.h"
+#include "chunk.h"
#include "uthash.h"
#define VERSION "0.1"
#define CODE_INDENT 4
-typedef struct {
- const unsigned char *data;
- int len;
- int alloc;
-} chunk;
-
typedef struct Inline {
enum { INL_STRING, INL_SOFTBREAK, INL_LINEBREAK, INL_CODE, INL_RAW_HTML, INL_ENTITY,
INL_EMPH, INL_STRONG, INL_LINK, INL_IMAGE } tag;
@@ -79,7 +77,6 @@ typedef struct Block {
struct Block* parent;
struct Block* top;
gh_buf string_content;
- int string_pos;
inl* inline_content;
union {
struct ListData list_data;
@@ -91,10 +88,10 @@ typedef struct Block {
struct Block * prev;
} block;
-inl* parse_inlines(gh_buf *input, int input_pos, reference** refmap);
+inl* parse_inlines(gh_buf *input, reference** refmap);
void free_inlines(inl* e);
-int parse_reference(gh_buf *input, int input_pos, reference** refmap);
+int parse_reference(gh_buf *input, reference** refmap);
void free_reference(reference *ref);
void free_reference_map(reference **refmap);
@@ -117,3 +114,4 @@ void inlines_to_html(gh_buf *html, inl *b);
void utf8proc_case_fold(gh_buf *dest, const unsigned char *str, int len);
+#endif