From aec1204a54e3baa12c76db75c2f67696def05eb0 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Fri, 14 Aug 2015 12:47:01 +0100 Subject: ui-shared: add cgit_print_error_page() function This will allow us to generate error responses with the correct HTTP response code without needing all of the layout boilerplate. Signed-off-by: John Keeping --- ui-shared.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui-shared.h') diff --git a/ui-shared.h b/ui-shared.h index d8a3551..652685e 100644 --- a/ui-shared.h +++ b/ui-shared.h @@ -64,6 +64,8 @@ extern void cgit_print_http_headers(void); extern void cgit_redirect(const char *url, bool permanent); extern void cgit_print_docstart(void); extern void cgit_print_docend(); +__attribute__((format (printf,3,4))) +extern void cgit_print_error_page(int code, const char *msg, const char *fmt, ...); extern void cgit_print_pageheader(void); extern void cgit_print_filemode(unsigned short mode); extern void cgit_print_snapshot_links(const char *repo, const char *head, -- cgit v1.2.3-70-g09d2