]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-blob.c
Makefile: autobuild dependency rules
[ps-cgit] / ui-blob.c
index be4fb88b690bbb04beb9fd371b1df2bcbe12a8d2..11589db2bbc947ea79f651b7855502224f6ebfa9 100644 (file)
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -8,8 +8,9 @@
 
 #include "cgit.h"
 #include "html.h"
 
 #include "cgit.h"
 #include "html.h"
+#include "ui-shared.h"
 
 
-void cgit_print_blob(struct cacheitem *item, const char *hex, char *path)
+void cgit_print_blob(const char *hex, char *path)
 {
 
        unsigned char sha1[20];
 {
 
        unsigned char sha1[20];
@@ -35,6 +36,8 @@ void cgit_print_blob(struct cacheitem *item, const char *hex, char *path)
        }
 
        buf[size] = '\0';
        }
 
        buf[size] = '\0';
-       cgit_print_snapshot_start("text/plain", path, item);
+       ctx.page.mimetype = "text/plain";
+       ctx.page.filename = path;
+       cgit_print_http_headers(&ctx);
        write(htmlfd, buf, size);
 }
        write(htmlfd, buf, size);
 }