diff options
| -rw-r--r-- | html.c | 2 | ||||
| -rw-r--r-- | xs_html.h | 12 | ||||
| -rw-r--r-- | xs_version.h | 2 |
3 files changed, 8 insertions, 8 deletions
| @@ -2270,7 +2270,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 2270 | xs_html_text(content)))); | 2270 | xs_html_text(content)))); |
| 2271 | } | 2271 | } |
| 2272 | 2272 | ||
| 2273 | *body = _xs_html_render(rss, xs_dup("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")); | 2273 | *body = xs_html_render_s(rss, xs_dup("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")); |
| 2274 | *b_size = strlen(*body); | 2274 | *b_size = strlen(*body); |
| 2275 | *ctype = "application/rss+xml; charset=utf-8"; | 2275 | *ctype = "application/rss+xml; charset=utf-8"; |
| 2276 | status = 200; | 2276 | status = 200; |
| @@ -21,8 +21,8 @@ xs_html *_xs_html_tag(char *tag, xs_html *var[]); | |||
| 21 | xs_html *_xs_html_sctag(char *tag, xs_html *var[]); | 21 | xs_html *_xs_html_sctag(char *tag, xs_html *var[]); |
| 22 | #define xs_html_sctag(tag, ...) _xs_html_sctag(tag, (xs_html *[]) { __VA_ARGS__, NULL }) | 22 | #define xs_html_sctag(tag, ...) _xs_html_sctag(tag, (xs_html *[]) { __VA_ARGS__, NULL }) |
| 23 | 23 | ||
| 24 | xs_str *_xs_html_render(xs_html *h, xs_str *s); | 24 | xs_str *xs_html_render_s(xs_html *h, xs_str *s); |
| 25 | #define xs_html_render(h) _xs_html_render(h, xs_str_new(NULL)) | 25 | #define xs_html_render(h) xs_html_render_s(h, xs_str_new(NULL)) |
| 26 | 26 | ||
| 27 | #ifdef XS_IMPLEMENTATION | 27 | #ifdef XS_IMPLEMENTATION |
| 28 | 28 | ||
| @@ -187,8 +187,8 @@ xs_html *_xs_html_sctag(char *tag, xs_html *var[]) | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | 189 | ||
| 190 | xs_str *_xs_html_render(xs_html *h, xs_str *s) | 190 | xs_str *xs_html_render_s(xs_html *h, xs_str *s) |
| 191 | /* renders the tag and its subtags */ | 191 | /* renders the tag and its subtags into s */ |
| 192 | { | 192 | { |
| 193 | xs_html *st; | 193 | xs_html *st; |
| 194 | 194 | ||
| @@ -201,7 +201,7 @@ xs_str *_xs_html_render(xs_html *h, xs_str *s) | |||
| 201 | st = h->f_attr; | 201 | st = h->f_attr; |
| 202 | while (st) { | 202 | while (st) { |
| 203 | xs_html *nst = st->next; | 203 | xs_html *nst = st->next; |
| 204 | s = _xs_html_render(st, s); | 204 | s = xs_html_render_s(st, s); |
| 205 | st = nst; | 205 | st = nst; |
| 206 | } | 206 | } |
| 207 | 207 | ||
| @@ -216,7 +216,7 @@ xs_str *_xs_html_render(xs_html *h, xs_str *s) | |||
| 216 | st = h->f_tag; | 216 | st = h->f_tag; |
| 217 | while (st) { | 217 | while (st) { |
| 218 | xs_html *nst = st->next; | 218 | xs_html *nst = st->next; |
| 219 | s = _xs_html_render(st, s); | 219 | s = xs_html_render_s(st, s); |
| 220 | st = nst; | 220 | st = nst; |
| 221 | } | 221 | } |
| 222 | 222 | ||
diff --git a/xs_version.h b/xs_version.h index fd4dd8f..3aac89b 100644 --- a/xs_version.h +++ b/xs_version.h | |||
| @@ -1 +1 @@ | |||
| /* d9404322f5bad91811bc0ad13d63360b586919cc 2023-11-20T20:13:34+01:00 */ | /* 2adde1fad4fabb223639e4002a7ff3ec8c1982d7 2023-11-22T13:05:51+01:00 */ | ||