Remove obsolete cacheitem parameter to ui-functions

This parameter hasn't been used for a very long time...

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
Lars Hjemli 2008-03-24 01:00:36 +01:00
父節點 f3c1a187fe
當前提交 b608e88adb
共有 6 個檔案被更改,包括 16 行新增17 行删除

12
cgit.c
查看文件

@ -81,7 +81,7 @@ char *find_default_branch(struct cgit_repo *repo)
return info.first_ref; return info.first_ref;
} }
static void cgit_print_repo_page(struct cacheitem *item) static void cgit_print_repo_page()
{ {
char *tmp; char *tmp;
int show_search; int show_search;
@ -132,7 +132,7 @@ static void cgit_print_repo_page(struct cacheitem *item)
} }
if ((cgit_cmd == CMD_SNAPSHOT) && ctx.repo->snapshots) { 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), cgit_repobasename(ctx.repo->url),
ctx.qry.path, ctx.qry.path,
ctx.repo->snapshots ); ctx.repo->snapshots );
@ -140,12 +140,12 @@ static void cgit_print_repo_page(struct cacheitem *item)
} }
if (cgit_cmd == CMD_PATCH) { if (cgit_cmd == CMD_PATCH) {
cgit_print_patch(ctx.qry.sha1, item); cgit_print_patch(ctx.qry.sha1);
return; return;
} }
if (cgit_cmd == CMD_BLOB) { 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; return;
} }
@ -210,9 +210,9 @@ static void cgit_fill_cache(struct cacheitem *item, int use_cache)
ctx.page.modified = time(NULL); ctx.page.modified = time(NULL);
ctx.page.expires = ctx.page.modified + ttl_seconds(item->ttl); ctx.page.expires = ctx.page.modified + ttl_seconds(item->ttl);
if (ctx.repo) if (ctx.repo)
cgit_print_repo_page(item); cgit_print_repo_page();
else else
cgit_print_repolist(item); cgit_print_repolist();
if (use_cache) { if (use_cache) {
chk_zero(close(STDOUT_FILENO), "Close redirected STDOUT"); chk_zero(close(STDOUT_FILENO), "Close redirected STDOUT");

12
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_branches(int maxcount);
extern void cgit_print_tags(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_summary();
extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep,
char *pattern, char *path, int pager); 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_tree(const char *rev, char *path);
extern void cgit_print_commit(char *hex); extern void cgit_print_commit(char *hex);
extern void cgit_print_refs(); extern void cgit_print_refs();
extern void cgit_print_tag(char *revname); 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_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_patch(char *hex);
extern void cgit_print_snapshot(struct cacheitem *item, const char *head, extern void cgit_print_snapshot(const char *head, const char *hex,
const char *hex, const char *prefix, const char *prefix, const char *filename,
const char *filename, int snapshot); int snapshot);
extern void cgit_print_snapshot_links(const char *repo, const char *head, extern void cgit_print_snapshot_links(const char *repo, const char *head,
const char *hex, int snapshots); const char *hex, int snapshots);
extern int cgit_parse_snapshots_mask(const char *str); extern int cgit_parse_snapshots_mask(const char *str);

查看文件

@ -9,7 +9,7 @@
#include "cgit.h" #include "cgit.h"
#include "html.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]; unsigned char sha1[20];

查看文件

@ -69,7 +69,7 @@ static void filepair_cb(struct diff_filepair *pair)
html("Error running diff"); html("Error running diff");
} }
void cgit_print_patch(char *hex, struct cacheitem *item) void cgit_print_patch(char *hex)
{ {
struct commit *commit; struct commit *commit;
struct commitinfo *info; struct commitinfo *info;

查看文件

@ -43,7 +43,7 @@ static void print_modtime(struct cgit_repo *repo)
cgit_print_age(s.st_mtime, -1, NULL); cgit_print_age(s.st_mtime, -1, NULL);
} }
void cgit_print_repolist(struct cacheitem *item) void cgit_print_repolist()
{ {
int i, columns = 4; int i, columns = 4;
char *last_group = NULL; char *last_group = NULL;

查看文件

@ -69,8 +69,7 @@ static const struct snapshot_archive_t {
#define snapshot_archives_len (sizeof(snapshot_archives) / sizeof(*snapshot_archives)) #define snapshot_archives_len (sizeof(snapshot_archives) / sizeof(*snapshot_archives))
void cgit_print_snapshot(struct cacheitem *item, const char *head, void cgit_print_snapshot(const char *head, const char *hex, const char *prefix,
const char *hex, const char *prefix,
const char *filename, int snapshots) const char *filename, int snapshots)
{ {
const struct snapshot_archive_t* sat; const struct snapshot_archive_t* sat;