summaryrefslogtreecommitdiff
path: root/src/stmd.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2014-09-04 18:49:33 +0200
committerVicent Marti <tanoku@gmail.com>2014-09-09 03:39:16 +0200
commit19ba82d7a30bd999a25fc303a8516056880abc9d (patch)
tree9e44eae3e263718d35bef9c99220a8ef7d1b9fb1 /src/stmd.h
parent9e4855365b920c2a80b0f1ab6937280f0b504334 (diff)
Rename node_block
Diffstat (limited to 'src/stmd.h')
-rw-r--r--src/stmd.h57
1 files changed, 30 insertions, 27 deletions
diff --git a/src/stmd.h b/src/stmd.h
index dbc8c8c..957ab03 100644
--- a/src/stmd.h
+++ b/src/stmd.h
@@ -67,29 +67,30 @@ struct FencedCodeData {
strbuf info;
};
-typedef struct Block {
- enum { document,
- block_quote,
- list,
- list_item,
- fenced_code,
- indented_code,
- html_block,
- paragraph,
- atx_header,
- setext_header,
- hrule,
- reference_def
+struct node_block {
+ enum {
+ document,
+ block_quote,
+ list,
+ list_item,
+ fenced_code,
+ indented_code,
+ html_block,
+ paragraph,
+ atx_header,
+ setext_header,
+ hrule,
+ reference_def
} tag;
int start_line;
int start_column;
int end_line;
bool open;
bool last_line_blank;
- struct Block* children;
- struct Block* last_child;
- struct Block* parent;
- struct Block* top;
+ struct node_block* children;
+ struct node_block* last_child;
+ struct node_block* parent;
+ struct node_block* top;
strbuf string_content;
node_inl* inline_content;
union {
@@ -98,9 +99,11 @@ typedef struct Block {
int header_level;
reference** refmap;
} attributes;
- struct Block * next;
- struct Block * prev;
-} block;
+ struct node_block * next;
+ struct node_block * prev;
+};
+
+typedef struct node_block node_block;
node_inl* parse_inlines(strbuf *input, reference** refmap);
void free_inlines(node_inl* e);
@@ -112,18 +115,18 @@ void free_reference_map(reference **refmap);
void add_reference(reference** refmap, reference* ref);
void unescape_buffer(strbuf *buf);
-extern block* make_document();
-extern block* add_child(block* parent,
+extern node_block* make_document();
+extern node_block* add_child(node_block* parent,
int block_type, int start_line, int start_column);
-void free_blocks(block* e);
+void free_blocks(node_block* e);
-extern block *stmd_parse_document(const unsigned char *buffer, size_t len);
-extern block *stmd_parse_file(FILE *f);
+extern node_block *stmd_parse_document(const unsigned char *buffer, size_t len);
+extern node_block *stmd_parse_file(FILE *f);
void print_inlines(node_inl* ils, int indent);
-void print_blocks(block* blk, int indent);
+void print_blocks(node_block* blk, int indent);
-void blocks_to_html(strbuf *html, block *b, bool tight);
+void blocks_to_html(strbuf *html, node_block *b, bool tight);
void inlines_to_html(strbuf *html, node_inl *b);
void utf8proc_case_fold(strbuf *dest, const unsigned char *str, int len);