render_html.c: Unify use of char versus MD_CHAR.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
diff --git a/md2html/render_html.c b/md2html/render_html.c
index 389388a..19483c5 100644
--- a/md2html/render_html.c
+++ b/md2html/render_html.c
@@ -63,7 +63,7 @@ render_text(MD_RENDER_HTML* r, const MD_CHAR* text, MD_SIZE size)
static void
-render_html_escaped(MD_RENDER_HTML* r, const char* data, MD_SIZE size)
+render_html_escaped(MD_RENDER_HTML* r, const MD_CHAR* data, MD_SIZE size)
{
MD_OFFSET beg = 0;
MD_OFFSET off = 0;
@@ -94,9 +94,9 @@ render_html_escaped(MD_RENDER_HTML* r, const char* data, MD_SIZE size)
}
static void
-render_url_escaped(MD_RENDER_HTML* r, const char* data, MD_SIZE size)
+render_url_escaped(MD_RENDER_HTML* r, const MD_CHAR* data, MD_SIZE size)
{
- static const char hex_chars[] = "0123456789ABCDEF";
+ static const MD_CHAR hex_chars[] = "0123456789ABCDEF";
MD_OFFSET beg = 0;
MD_OFFSET off = 0;
@@ -144,9 +144,9 @@ hex_val(char ch)
static void
render_utf8_codepoint(MD_RENDER_HTML* r, unsigned codepoint,
- void (*fn_append)(MD_RENDER_HTML*, const char*, MD_SIZE))
+ void (*fn_append)(MD_RENDER_HTML*, const MD_CHAR*, MD_SIZE))
{
- static const char utf8_replacement_char[] = { 0xef, 0xbf, 0xbd };
+ static const MD_CHAR utf8_replacement_char[] = { 0xef, 0xbf, 0xbd };
unsigned char utf8[4];
size_t n;
@@ -181,7 +181,7 @@ render_utf8_codepoint(MD_RENDER_HTML* r, unsigned codepoint,
* if such entity is unknown (or if the translation is disabled). */
static void
render_entity(MD_RENDER_HTML* r, const MD_CHAR* text, MD_SIZE size,
- void (*fn_append)(MD_RENDER_HTML*, const char*, MD_SIZE))
+ void (*fn_append)(MD_RENDER_HTML*, const MD_CHAR*, MD_SIZE))
{
if(r->flags & MD_RENDER_FLAG_VERBATIM_ENTITIES) {
fn_append(r, text, size);
@@ -208,7 +208,7 @@ render_entity(MD_RENDER_HTML* r, const MD_CHAR* text, MD_SIZE size,
return;
} else {
/* Named entity (e.g. " "). */
- const char* ent;
+ const MD_CHAR* ent;
ent = entity_lookup(text, size);
if(ent != NULL) {
@@ -222,7 +222,7 @@ render_entity(MD_RENDER_HTML* r, const MD_CHAR* text, MD_SIZE size,
static void
render_attribute(MD_RENDER_HTML* r, const MD_ATTRIBUTE* attr,
- void (*fn_append)(MD_RENDER_HTML*, const char*, MD_SIZE))
+ void (*fn_append)(MD_RENDER_HTML*, const MD_CHAR*, MD_SIZE))
{
int i;
@@ -272,7 +272,7 @@ render_open_code_block(MD_RENDER_HTML* r, const MD_BLOCK_CODE_DETAIL* det)
}
static void
-render_open_td_block(MD_RENDER_HTML* r, const char* cell_type, const MD_BLOCK_TD_DETAIL* det)
+render_open_td_block(MD_RENDER_HTML* r, const MD_CHAR* cell_type, const MD_BLOCK_TD_DETAIL* det)
{
RENDER_LITERAL(r, "<");
RENDER_LITERAL(r, cell_type);
@@ -331,7 +331,7 @@ render_close_img_span(MD_RENDER_HTML* r, const MD_SPAN_IMG_DETAIL* det)
static int
enter_block_callback(MD_BLOCKTYPE type, void* detail, void* userdata)
{
- static const char* head[6] = { "<h1>", "<h2>", "<h3>", "<h4>", "<h5>", "<h6>" };
+ static const MD_CHAR* head[6] = { "<h1>", "<h2>", "<h3>", "<h4>", "<h5>", "<h6>" };
MD_RENDER_HTML* r = (MD_RENDER_HTML*) userdata;
switch(type) {
@@ -359,7 +359,7 @@ enter_block_callback(MD_BLOCKTYPE type, void* detail, void* userdata)
static int
leave_block_callback(MD_BLOCKTYPE type, void* detail, void* userdata)
{
- static const char* head[6] = { "</h1>\n", "</h2>\n", "</h3>\n", "</h4>\n", "</h5>\n", "</h6>\n" };
+ static const MD_CHAR* head[6] = { "</h1>\n", "</h2>\n", "</h3>\n", "</h4>\n", "</h5>\n", "</h6>\n" };
MD_RENDER_HTML* r = (MD_RENDER_HTML*) userdata;
switch(type) {