summaryrefslogtreecommitdiff
path: root/xs_html.h
diff options
context:
space:
mode:
authorGravatar default2023-11-22 13:07:19 +0100
committerGravatar default2023-11-22 13:07:19 +0100
commit258850feac51cab378461331f820d584dfa6d948 (patch)
tree6c5c12ebfdadd7e464136de2052026501900acec /xs_html.h
parentSome xs_html usage in html_notifications(). (diff)
downloadpenes-snac2-258850feac51cab378461331f820d584dfa6d948.tar.gz
penes-snac2-258850feac51cab378461331f820d584dfa6d948.tar.xz
penes-snac2-258850feac51cab378461331f820d584dfa6d948.zip
Backport from xs.
Diffstat (limited to 'xs_html.h')
-rw-r--r--xs_html.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/xs_html.h b/xs_html.h
index d34a7e0..254ba20 100644
--- a/xs_html.h
+++ b/xs_html.h
@@ -21,8 +21,8 @@ xs_html *_xs_html_tag(char *tag, xs_html *var[]);
21xs_html *_xs_html_sctag(char *tag, xs_html *var[]); 21xs_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
24xs_str *_xs_html_render(xs_html *h, xs_str *s); 24xs_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
190xs_str *_xs_html_render(xs_html *h, xs_str *s) 190xs_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