From 543c2c94d71adee42c7bd2f8027d75c87ed8120d Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Thu, 4 Sep 2014 18:38:14 +0200 Subject: Rename to strbuf --- src/html/houdini_href_e.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/html/houdini_href_e.c') diff --git a/src/html/houdini_href_e.c b/src/html/houdini_href_e.c index b2a7d79..12456ce 100644 --- a/src/html/houdini_href_e.c +++ b/src/html/houdini_href_e.c @@ -49,7 +49,7 @@ static const char HREF_SAFE[] = { }; int -houdini_escape_href(gh_buf *ob, const uint8_t *src, size_t size) +houdini_escape_href(strbuf *ob, const uint8_t *src, size_t size) { static const uint8_t hex_chars[] = "0123456789ABCDEF"; size_t i = 0, org; @@ -63,7 +63,7 @@ houdini_escape_href(gh_buf *ob, const uint8_t *src, size_t size) i++; if (likely(i > org)) - gh_buf_put(ob, src + org, i - org); + strbuf_put(ob, src + org, i - org); /* escaping */ if (i >= size) @@ -73,14 +73,14 @@ houdini_escape_href(gh_buf *ob, const uint8_t *src, size_t size) /* amp appears all the time in URLs, but needs * HTML-entity escaping to be inside an href */ case '&': - gh_buf_puts(ob, "&"); + strbuf_puts(ob, "&"); break; /* the single quote is a valid URL character * according to the standard; it needs HTML * entity escaping too */ case '\'': - gh_buf_puts(ob, "'"); + strbuf_puts(ob, "'"); break; /* the space can be escaped to %20 or a plus @@ -89,7 +89,7 @@ houdini_escape_href(gh_buf *ob, const uint8_t *src, size_t size) * when building GET strings */ #if 0 case ' ': - gh_buf_putc(ob, '+'); + strbuf_putc(ob, '+'); break; #endif @@ -97,7 +97,7 @@ houdini_escape_href(gh_buf *ob, const uint8_t *src, size_t size) default: hex_str[1] = hex_chars[(src[i] >> 4) & 0xF]; hex_str[2] = hex_chars[src[i] & 0xF]; - gh_buf_put(ob, hex_str, 3); + strbuf_put(ob, hex_str, 3); } i++; -- cgit v1.2.3