diff options
author | John Keeping <john@keeping.me.uk> | 2015-08-14 13:47:11 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2015-08-14 15:46:51 +0200 |
commit | 764987980ec0e806205b8e075feafd4e010dcbd9 (patch) | |
tree | 3615d20fa53c80a46338fd97278a6279a15fc476 /ui-shared.c | |
parent | fb2c71fad23f4f13f56f74a8b79907805ab1b772 (diff) | |
download | cgit-764987980ec0e806205b8e075feafd4e010dcbd9.tar.gz cgit-764987980ec0e806205b8e075feafd4e010dcbd9.tar.xz |
ui-shared: add cgit_print_layout_{start,end}()
These will avoid needing to call three functions to start page layout in
subsequent patches when we move the layout setup into each individual
page.
Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'ui-shared.c')
-rw-r--r-- | ui-shared.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index 06dd0a8..de06256 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -802,6 +802,18 @@ void cgit_print_error_page(int code, const char *msg, const char *fmt, ...) cgit_print_docend(); } +void cgit_print_layout_start(void) +{ + cgit_print_http_headers(); + cgit_print_docstart(); + cgit_print_pageheader(); +} + +void cgit_print_layout_end(void) +{ + cgit_print_docend(); +} + static void add_clone_urls(void (*fn)(const char *), char *txt, char *suffix) { struct strbuf **url_list = strbuf_split_str(txt, ' ', 0); |