mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 16:38:42 +00:00
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>
This commit is contained in:
parent
fb2c71fad2
commit
764987980e
12
ui-shared.c
12
ui-shared.c
@ -802,6 +802,18 @@ void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
|
|||||||
cgit_print_docend();
|
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)
|
static void add_clone_urls(void (*fn)(const char *), char *txt, char *suffix)
|
||||||
{
|
{
|
||||||
struct strbuf **url_list = strbuf_split_str(txt, ' ', 0);
|
struct strbuf **url_list = strbuf_split_str(txt, ' ', 0);
|
||||||
|
@ -54,6 +54,9 @@ extern void cgit_object_link(struct object *obj);
|
|||||||
extern void cgit_submodule_link(const char *class, char *path,
|
extern void cgit_submodule_link(const char *class, char *path,
|
||||||
const char *rev);
|
const char *rev);
|
||||||
|
|
||||||
|
extern void cgit_print_layout_start(void);
|
||||||
|
extern void cgit_print_layout_end(void);
|
||||||
|
|
||||||
__attribute__((format (printf,1,2)))
|
__attribute__((format (printf,1,2)))
|
||||||
extern void cgit_print_error(const char *fmt, ...);
|
extern void cgit_print_error(const char *fmt, ...);
|
||||||
__attribute__((format (printf,1,0)))
|
__attribute__((format (printf,1,0)))
|
||||||
|
Loading…
Reference in New Issue
Block a user