| -rw-r--r-- | html.c | 7 | ||||
| -rw-r--r-- | html.h | 1 |
2 files changed, 8 insertions, 0 deletions
@@ -121,6 +121,13 @@ void html_vtxtf(const char *format, va_list ap) strbuf_release(&buf); } +void html_status(int code, const char *msg, int more_headers) +{ + htmlf("Status: %d %s\n", code, msg); + if (!more_headers) + html("\n"); +} + void html_txt(const char *txt) { const char *t = txt; @@ -18,6 +18,7 @@ extern void html_vtxtf(const char *format, va_list ap); __attribute__((format (printf,1,2))) extern void html_attrf(const char *format,...); +extern void html_status(int code, const char *msg, int more_headers); extern void html_txt(const char *txt); extern void html_ntxt(int len, const char *txt); extern void html_attr(const char *txt); |