diff options
Diffstat (limited to 'src/houdini_html_u.c')
-rw-r--r--[-rwxr-xr-x] | src/houdini_html_u.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/houdini_html_u.c b/src/houdini_html_u.c index a2d927b..6e8d620 100755..100644 --- a/src/houdini_html_u.c +++ b/src/houdini_html_u.c @@ -9,12 +9,13 @@ /* Binary tree lookup code for entities added by JGM */ -static unsigned char *S_lookup(int i, int low, int hi, const unsigned char *s, - int len) { +static const unsigned char *S_lookup(int i, int low, int hi, + const unsigned char *s, int len) { int j; - int cmp = strncmp((char *)s, (char *)cmark_entities[i].entity, len); + int cmp = + strncmp((const char *)s, (const char *)cmark_entities[i].entity, len); if (cmp == 0 && cmark_entities[i].entity[len] == 0) { - return (unsigned char *)cmark_entities[i].bytes; + return (const unsigned char *)cmark_entities[i].bytes; } else if (cmp < 0 && i > low) { j = i - ((i - low) / 2); if (j == i) @@ -30,7 +31,7 @@ static unsigned char *S_lookup(int i, int low, int hi, const unsigned char *s, } } -static unsigned char *S_lookup_entity(const unsigned char *s, int len) { +static const unsigned char *S_lookup_entity(const unsigned char *s, int len) { return S_lookup(CMARK_NUM_ENTITIES / 2, 0, CMARK_NUM_ENTITIES - 1, s, len); } |