summaryrefslogtreecommitdiff
path: root/src/html.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2015-06-07 16:52:44 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2015-06-07 21:42:15 +0200
commit7382fd5eba48107a8190bd2d6232cc3b6e20d8fc (patch)
treeb0d3c9f7b9a2f2eb94c0806c32e9d77f4ba59149 /src/html.c
parentd49d3fd7bab4a8734e5f22318e3fb538bfe20dbb (diff)
Convert code base to strbuf_t
There are probably a couple of places I missed. But this will only be a problem if we use a 64-bit bufsize_t at some point. Then, we'll get warnings from -Wshorten-64-to-32.
Diffstat (limited to 'src/html.c')
-rw-r--r--src/html.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/html.c b/src/html.c
index d3f9fc7..317eb45 100644
--- a/src/html.c
+++ b/src/html.c
@@ -11,20 +11,20 @@
// Functions to convert cmark_nodes to HTML strings.
-static void escape_html(cmark_strbuf *dest, const unsigned char *source, int length)
+static void escape_html(cmark_strbuf *dest, const unsigned char *source, bufsize_t length)
{
if (length < 0)
length = strlen((char *)source);
- houdini_escape_html0(dest, source, (size_t)length, 0);
+ houdini_escape_html0(dest, source, length, 0);
}
-static void escape_href(cmark_strbuf *dest, const unsigned char *source, int length)
+static void escape_href(cmark_strbuf *dest, const unsigned char *source, bufsize_t length)
{
if (length < 0)
length = strlen((char *)source);
- houdini_escape_href(dest, source, (size_t)length);
+ houdini_escape_href(dest, source, length);
}
static inline void cr(cmark_strbuf *html)
@@ -165,7 +165,7 @@ S_render_node(cmark_node *node, cmark_event_type ev_type,
S_render_sourcepos(node, html, options);
cmark_strbuf_puts(html, "><code>");
} else {
- int first_tag = 0;
+ bufsize_t first_tag = 0;
while (first_tag < node->as.code.info.len &&
node->as.code.info.data[first_tag] != ' ') {
first_tag += 1;