]> git.cameronkatri.com Git - cgit.git/commitdiff
Remove obsolete cacheitem parameter to ui-functions
authorLars Hjemli <hjemli@gmail.com>
Mon, 24 Mar 2008 00:00:36 +0000 (01:00 +0100)
committerLars Hjemli <hjemli@gmail.com>
Mon, 24 Mar 2008 00:01:28 +0000 (01:01 +0100)
This parameter hasn't been used for a very long time...

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
cgit.c
cgit.h
ui-blob.c
ui-patch.c
ui-repolist.c
ui-snapshot.c

diff --git a/cgit.c b/cgit.c
index d0f69058f41b55de9a6b040c5cd3f527ece94be8..a83f0bec60c073c254042088b87ae863cc3b5b8b 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -81,7 +81,7 @@ char *find_default_branch(struct cgit_repo *repo)
                return info.first_ref;
 }
 
-static void cgit_print_repo_page(struct cacheitem *item)
+static void cgit_print_repo_page()
 {
        char *tmp;
        int show_search;
@@ -132,7 +132,7 @@ static void cgit_print_repo_page(struct cacheitem *item)
        }
 
        if ((cgit_cmd == CMD_SNAPSHOT) && ctx.repo->snapshots) {
-               cgit_print_snapshot(item, ctx.qry.head, ctx.qry.sha1,
+               cgit_print_snapshot(ctx.qry.head, ctx.qry.sha1,
                                    cgit_repobasename(ctx.repo->url),
                                    ctx.qry.path,
                                    ctx.repo->snapshots );
@@ -140,12 +140,12 @@ static void cgit_print_repo_page(struct cacheitem *item)
        }
 
        if (cgit_cmd == CMD_PATCH) {
-               cgit_print_patch(ctx.qry.sha1, item);
+               cgit_print_patch(ctx.qry.sha1);
                return;
        }
 
        if (cgit_cmd == CMD_BLOB) {
-               cgit_print_blob(item, ctx.qry.sha1, ctx.qry.path);
+               cgit_print_blob(ctx.qry.sha1, ctx.qry.path);
                return;
        }
 
@@ -210,9 +210,9 @@ static void cgit_fill_cache(struct cacheitem *item, int use_cache)
        ctx.page.modified = time(NULL);
        ctx.page.expires = ctx.page.modified + ttl_seconds(item->ttl);
        if (ctx.repo)
-               cgit_print_repo_page(item);
+               cgit_print_repo_page();
        else
-               cgit_print_repolist(item);
+               cgit_print_repolist();
 
        if (use_cache) {
                chk_zero(close(STDOUT_FILENO), "Close redirected STDOUT");
diff --git a/cgit.h b/cgit.h
index 8ab8e0720f1b57193d4a2070dc0f61dda9cd8f61..40e2d40b43a9de331d63fd1ec44b342cfedc95fc 100644 (file)
--- a/cgit.h
+++ b/cgit.h
@@ -278,20 +278,20 @@ extern void cgit_print_filemode(unsigned short mode);
 extern void cgit_print_branches(int maxcount);
 extern void cgit_print_tags(int maxcount);
 
-extern void cgit_print_repolist(struct cacheitem *item);
+extern void cgit_print_repolist();
 extern void cgit_print_summary();
 extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep,
                           char *pattern, char *path, int pager);
-extern void cgit_print_blob(struct cacheitem *item, const char *hex, char *path);
+extern void cgit_print_blob(const char *hex, char *path);
 extern void cgit_print_tree(const char *rev, char *path);
 extern void cgit_print_commit(char *hex);
 extern void cgit_print_refs();
 extern void cgit_print_tag(char *revname);
 extern void cgit_print_diff(const char *new_hex, const char *old_hex, const char *prefix);
-extern void cgit_print_patch(char *hex, struct cacheitem *item);
-extern void cgit_print_snapshot(struct cacheitem *item, const char *head,
-                               const char *hex, const char *prefix,
-                               const char *filename, int snapshot);
+extern void cgit_print_patch(char *hex);
+extern void cgit_print_snapshot(const char *head, const char *hex,
+                               const char *prefix, const char *filename,
+                               int snapshot);
 extern void cgit_print_snapshot_links(const char *repo, const char *head,
                                      const char *hex, int snapshots);
 extern int cgit_parse_snapshots_mask(const char *str);
index bd44574e4caf07af4d25ed135e4abb05a4bc0349..3b291329a481f032fc8052e4b885aec2affbf695 100644 (file)
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -9,7 +9,7 @@
 #include "cgit.h"
 #include "html.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];
index a77f3f6cccc67ea85029eba247c61f8470303fa5..68ebb152781bb1352c0003d2ae87f64c2537a7b9 100644 (file)
@@ -69,7 +69,7 @@ static void filepair_cb(struct diff_filepair *pair)
                html("Error running diff");
 }
 
-void cgit_print_patch(char *hex, struct cacheitem *item)
+void cgit_print_patch(char *hex)
 {
        struct commit *commit;
        struct commitinfo *info;
index e6635855e0446b6ee52bc7fc5537914bf8b8fe16..ad9b1bc4aa020c3bb7a3db4f178b207d65ff3fd2 100644 (file)
@@ -43,7 +43,7 @@ static void print_modtime(struct cgit_repo *repo)
        cgit_print_age(s.st_mtime, -1, NULL);
 }
 
-void cgit_print_repolist(struct cacheitem *item)
+void cgit_print_repolist()
 {
        int i, columns = 4;
        char *last_group = NULL;
index 444980369df9318701ec1f6e5e6dd7930b17900d..c7414691290eef3dc335c237810d07e3524f5907 100644 (file)
@@ -69,8 +69,7 @@ static const struct snapshot_archive_t {
 
 #define snapshot_archives_len (sizeof(snapshot_archives) / sizeof(*snapshot_archives))
 
-void cgit_print_snapshot(struct cacheitem *item, const char *head,
-                        const char *hex, const char *prefix,
+void cgit_print_snapshot(const char *head, const char *hex, const char *prefix,
                         const char *filename, int snapshots)
 {
        const struct snapshot_archive_t* sat;