From f3c1a187fe2bc33f8423cd535d5045899699995b Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sun, 23 Mar 2008 23:51:19 +0000 Subject: 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 --- (limited to 'ui-patch.c') diff --git a/ui-patch.c b/ui-patch.c index d93426b..a77f3f6 100644 --- a/ui-patch.c +++ b/ui-patch.c @@ -92,7 +92,9 @@ void cgit_print_patch(char *hex, struct cacheitem *item) hashcpy(old_sha1, commit->parents->item->object.sha1); patchname = fmt("%s.patch", sha1_to_hex(sha1)); - cgit_print_snapshot_start("text/plain", patchname, item); + ctx.page.mimetype = "text/plain"; + ctx.page.filename = patchname; + cgit_print_http_headers(&ctx); htmlf("From %s Mon Sep 17 00:00:00 2001\n", sha1_to_hex(sha1)); htmlf("From: %s%s\n", info->author, info->author_email); html("Date: "); -- cgit v0.9.0.2