summaryrefslogtreecommitdiff
path: root/src/stmd.h
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-10-24 20:22:05 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-10-24 20:26:03 -0700
commitabc95bdfa1fd4f4ffb5b0727aec34791a6e472e5 (patch)
tree41d7aadcb3a91edd0610da1cd85d9c0a1c02fff7 /src/stmd.h
parent7f0d1a80c7871a97dcf6495fba9f0e3c8d86be81 (diff)
Renamed c program and library stmd -> cmark.
Also renamed internal library functions accordingly.
Diffstat (limited to 'src/stmd.h')
-rw-r--r--src/stmd.h115
1 files changed, 0 insertions, 115 deletions
diff --git a/src/stmd.h b/src/stmd.h
deleted file mode 100644
index 552e60e..0000000
--- a/src/stmd.h
+++ /dev/null
@@ -1,115 +0,0 @@
-#ifndef _STDMD_H_
-#define _STDMD_H_
-
-#include <stdbool.h>
-#include <stdio.h>
-#include "buffer.h"
-#include "chunk.h"
-#include "references.h"
-
-#define VERSION "0.1"
-#define CODE_INDENT 4
-
-struct node_inl {
- enum {
- INL_STRING,
- INL_SOFTBREAK,
- INL_LINEBREAK,
- INL_CODE,
- INL_RAW_HTML,
- INL_EMPH,
- INL_STRONG,
- INL_LINK,
- INL_IMAGE
- } tag;
- union {
- chunk literal;
- struct node_inl *inlines;
- struct {
- struct node_inl *label;
- unsigned char *url;
- unsigned char *title;
- } linkable;
- } content;
- struct node_inl *next;
-};
-
-typedef struct node_inl node_inl;
-
-// Types for blocks
-struct ListData {
- enum {
- bullet,
- ordered
- } list_type;
- int marker_offset;
- int padding;
- int start;
- enum {
- period,
- parens
- } delimiter;
- unsigned char bullet_char;
- bool tight;
-};
-
-struct FencedCodeData {
- int fence_length;
- int fence_offset;
- unsigned char fence_char;
- strbuf info;
-};
-
-struct node_block {
- enum {
- BLOCK_DOCUMENT,
- BLOCK_BQUOTE,
- BLOCK_LIST,
- BLOCK_LIST_ITEM,
- BLOCK_FENCED_CODE,
- BLOCK_INDENTED_CODE,
- BLOCK_HTML,
- BLOCK_PARAGRAPH,
- BLOCK_ATX_HEADER,
- BLOCK_SETEXT_HEADER,
- BLOCK_HRULE,
- BLOCK_REFERENCE_DEF
- } tag;
- int start_line;
- int start_column;
- int end_line;
- bool open;
- bool last_line_blank;
- 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 {
- struct ListData list;
- struct FencedCodeData code;
- struct {
- int level;
- } header;
- struct {
- reference_map *refmap;
- } document;
- } as;
-
- struct node_block *next;
- struct node_block *prev;
-};
-
-typedef struct node_block node_block;
-
-node_block *stmd_parse_document(const unsigned char *buffer, size_t len);
-node_block *stmd_parse_file(FILE *f);
-
-void stmd_free_nodes(node_block *e);
-
-void stmd_debug_print(node_block *root);
-void stmd_render_html(strbuf *html, node_block *root);
-
-#endif