aboutsummaryrefslogtreecommitdiffstats
path: root/ui-shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 36fcb21..06dd0a8 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -788,6 +788,20 @@ void cgit_print_docend(void)
788 html("</body>\n</html>\n"); 788 html("</body>\n</html>\n");
789} 789}
790 790
791void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
792{
793 va_list ap;
794 ctx.page.status = code;
795 ctx.page.statusmsg = msg;
796 cgit_print_http_headers();
797 cgit_print_docstart();
798 cgit_print_pageheader();
799 va_start(ap, fmt);
800 cgit_vprint_error(fmt, ap);
801 va_end(ap);
802 cgit_print_docend();
803}
804
791static void add_clone_urls(void (*fn)(const char *), char *txt, char *suffix) 805static void add_clone_urls(void (*fn)(const char *), char *txt, char *suffix)
792{ 806{
793 struct strbuf **url_list = strbuf_split_str(txt, ' ', 0); 807 struct strbuf **url_list = strbuf_split_str(txt, ' ', 0);