diff options
Diffstat (limited to 'ui-plain.c')
-rw-r--r-- | ui-plain.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -103,7 +103,7 @@ static int print_object(const unsigned char *sha1, const char *path) | |||
103 | ctx.page.filename = path; | 103 | ctx.page.filename = path; |
104 | ctx.page.size = size; | 104 | ctx.page.size = size; |
105 | ctx.page.etag = sha1_to_hex(sha1); | 105 | ctx.page.etag = sha1_to_hex(sha1); |
106 | cgit_print_http_headers(&ctx); | 106 | cgit_print_http_headers(); |
107 | html_raw(buf, size); | 107 | html_raw(buf, size); |
108 | /* If we allocated this, then casting away const is safe. */ | 108 | /* If we allocated this, then casting away const is safe. */ |
109 | if (freemime) | 109 | if (freemime) |
@@ -128,7 +128,7 @@ static void print_dir(const unsigned char *sha1, const char *base, | |||
128 | fullpath = buildpath(base, baselen, path); | 128 | fullpath = buildpath(base, baselen, path); |
129 | slash = (fullpath[0] == '/' ? "" : "/"); | 129 | slash = (fullpath[0] == '/' ? "" : "/"); |
130 | ctx.page.etag = sha1_to_hex(sha1); | 130 | ctx.page.etag = sha1_to_hex(sha1); |
131 | cgit_print_http_headers(&ctx); | 131 | cgit_print_http_headers(); |
132 | htmlf("<html><head><title>%s", slash); | 132 | htmlf("<html><head><title>%s", slash); |
133 | html_txt(fullpath); | 133 | html_txt(fullpath); |
134 | htmlf("</title></head>\n<body>\n<h2>%s", slash); | 134 | htmlf("</title></head>\n<body>\n<h2>%s", slash); |
@@ -206,14 +206,14 @@ static int basedir_len(const char *path) | |||
206 | return 0; | 206 | return 0; |
207 | } | 207 | } |
208 | 208 | ||
209 | void cgit_print_plain(struct cgit_context *ctx) | 209 | void cgit_print_plain(void) |
210 | { | 210 | { |
211 | const char *rev = ctx->qry.sha1; | 211 | const char *rev = ctx.qry.sha1; |
212 | unsigned char sha1[20]; | 212 | unsigned char sha1[20]; |
213 | struct commit *commit; | 213 | struct commit *commit; |
214 | struct pathspec_item path_items = { | 214 | struct pathspec_item path_items = { |
215 | .match = ctx->qry.path, | 215 | .match = ctx.qry.path, |
216 | .len = ctx->qry.path ? strlen(ctx->qry.path) : 0 | 216 | .len = ctx.qry.path ? strlen(ctx.qry.path) : 0 |
217 | }; | 217 | }; |
218 | struct pathspec paths = { | 218 | struct pathspec paths = { |
219 | .nr = 1, | 219 | .nr = 1, |
@@ -224,7 +224,7 @@ void cgit_print_plain(struct cgit_context *ctx) | |||
224 | }; | 224 | }; |
225 | 225 | ||
226 | if (!rev) | 226 | if (!rev) |
227 | rev = ctx->qry.head; | 227 | rev = ctx.qry.head; |
228 | 228 | ||
229 | if (get_sha1(rev, sha1)) { | 229 | if (get_sha1(rev, sha1)) { |
230 | html_status(404, "Not found", 0); | 230 | html_status(404, "Not found", 0); |