X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/e651cb0d2dc2dbd458c51cdba8ae56e8629348cc..df90b51bafec24336cf30339b2978ff6df22b075:/html.c diff --git a/html.c b/html.c index 76fa6c4..0962e71 100644 --- a/html.c +++ b/html.c @@ -6,7 +6,13 @@ * (see COPYING for full license text) */ -#include "cgit.h" +#include +#include +#include +#include +#include + +int htmlfd = STDOUT_FILENO; char *fmt(const char *format, ...) { @@ -21,8 +27,10 @@ char *fmt(const char *format, ...) va_start(args, format); len = vsnprintf(buf[bufidx], sizeof(buf[bufidx]), format, args); va_end(args); - if (len>sizeof(buf[bufidx])) - die("[html.c] string truncated: %s", format); + if (len>sizeof(buf[bufidx])) { + fprintf(stderr, "[html.c] string truncated: %s\n", format); + exit(1); + } return buf[bufidx]; } @@ -126,6 +134,18 @@ void html_hidden(char *name, char *value) html("'/>"); } +void html_option(char *value, char *text, char *selected_value) +{ + html("\n"); +} + void html_link_open(char *url, char *title, char *class) { html("> 6); - html_fileperm(mode >> 3); - html_fileperm(mode); -} - int html_include(const char *filename) { FILE *f;