diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-03-13 21:25:25 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-03-13 21:25:25 -0700 |
commit | c4eb6bc33d9639ce0840a5fa3cea173c2c816fd1 (patch) | |
tree | 6724e3dbf909f022095cb5a7ad669c15477dfb78 /src/html.c | |
parent | c187089e8725b45144ec668c4bd95b99b28633d5 (diff) | |
parent | af98c75f1ad3338c813aa475aa1b543dd80c138a (diff) |
Merge pull request #109 from nwellnhof/msvc-c99
Compile in plain C mode with MSVC 12.0 or newer
Diffstat (limited to 'src/html.c')
-rw-r--r-- | src/html.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -10,6 +10,8 @@ #include "houdini.h" #include "scanners.h" +#define BUFFER_SIZE 100 + // Functions to convert cmark_nodes to HTML strings. static void escape_html(cmark_strbuf *dest, const unsigned char *source, @@ -17,7 +19,7 @@ static void escape_html(cmark_strbuf *dest, const unsigned char *source, houdini_escape_html0(dest, source, length, 0); } -static inline void cr(cmark_strbuf *html) { +static CMARK_INLINE void cr(cmark_strbuf *html) { if (html->size && html->ptr[html->size - 1] != '\n') cmark_strbuf_putc(html, '\n'); } @@ -29,7 +31,6 @@ struct render_state { static void S_render_sourcepos(cmark_node *node, cmark_strbuf *html, int options) { - const size_t BUFFER_SIZE = 100; char buffer[BUFFER_SIZE]; if (CMARK_OPT_SOURCEPOS & options) { snprintf(buffer, BUFFER_SIZE, " data-sourcepos=\"%d:%d-%d:%d\"", @@ -47,7 +48,6 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, char start_heading[] = "<h0"; char end_heading[] = "</h0"; bool tight; - const size_t BUFFER_SIZE = 100; char buffer[BUFFER_SIZE]; bool entering = (ev_type == CMARK_EVENT_ENTER); |