summaryrefslogtreecommitdiff
path: root/src/html.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2016-03-12 11:29:55 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2016-03-12 11:51:31 +0100
commit6135e9b953747365358f7f2e23e53cc0e4a701b2 (patch)
treed93788a09c7548857d3d7a35c64c3ba51493d075 /src/html.c
parent0e216b4044f1cbbf30df4e378d51d91a0267e680 (diff)
Don't use variable length arrays
They're not supported by MSVC.
Diffstat (limited to 'src/html.c')
-rw-r--r--src/html.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/html.c b/src/html.c
index 753e5e2..9ffa08a 100644
--- a/src/html.c
+++ b/src/html.c
@@ -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,
@@ -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);