diff options
author | Lars Hjemli <hjemli@gmail.com> | 2008-03-24 00:51:19 +0100 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-03-24 00:51:19 +0100 |
commit | f3c1a187fe2bc33f8423cd535d5045899699995b (patch) | |
tree | b5c553da7b108900535fcfcd24b78bdd0ac62387 /cgit.h | |
parent | b1f9b9c1459cb9a30ebf80721aff6ef788d1f891 (diff) | |
download | cgit-f3c1a187fe2bc33f8423cd535d5045899699995b.tar.gz cgit-f3c1a187fe2bc33f8423cd535d5045899699995b.tar.bz2 cgit-f3c1a187fe2bc33f8423cd535d5045899699995b.zip |
Add struct cgit_page to cgit_context
This struct is used when generating http headers, and as such is another
small step towards the goal of the whole cleanup series; to invoke each
page/view function with a function pointer.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | cgit.h | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -174,10 +174,20 @@ struct cgit_config { int summary_tags; }; +struct cgit_page { + time_t modified; + time_t expires; + char *mimetype; + char *charset; + char *filename; + char *title; +}; + struct cgit_context { struct cgit_query qry; struct cgit_config cfg; struct cgit_repo *repo; + struct cgit_page page; }; extern const char *cgit_version; @@ -260,12 +270,10 @@ extern void cgit_object_link(struct object *obj); extern void cgit_print_error(char *msg); extern void cgit_print_date(time_t secs, char *format); extern void cgit_print_age(time_t t, time_t max_relative, char *format); -extern void cgit_print_docstart(char *title, struct cacheitem *item); +extern void cgit_print_http_headers(struct cgit_context *ctx); +extern void cgit_print_docstart(struct cgit_context *ctx); extern void cgit_print_docend(); -extern void cgit_print_pageheader(char *title, int show_search); -extern void cgit_print_snapshot_start(const char *mimetype, - const char *filename, - struct cacheitem *item); +extern void cgit_print_pageheader(struct cgit_context *ctx); extern void cgit_print_filemode(unsigned short mode); extern void cgit_print_branches(int maxcount); extern void cgit_print_tags(int maxcount); |