summaryrefslogtreecommitdiffabout
path: root/ui-snapshot.c
authorLars Hjemli <hjemli@gmail.com>2008-03-24 00:00:36 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2008-03-24 00:01:28 (UTC)
commitb608e88adb6f77328288afb6dd0eddf674fc9b5b (patch) (unidiff)
treee194a466ba00d67bc037c76329ca050e84e1223b /ui-snapshot.c
parentf3c1a187fe2bc33f8423cd535d5045899699995b (diff)
downloadcgit-b608e88adb6f77328288afb6dd0eddf674fc9b5b.zip
cgit-b608e88adb6f77328288afb6dd0eddf674fc9b5b.tar.gz
cgit-b608e88adb6f77328288afb6dd0eddf674fc9b5b.tar.bz2
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>
Diffstat (limited to 'ui-snapshot.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-snapshot.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui-snapshot.c b/ui-snapshot.c
index 4449803..c741469 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -56,34 +56,33 @@ static int write_tar_bzip2_archive(struct archiver_args *args)
56} 56}
57 57
58static const struct snapshot_archive_t { 58static const struct snapshot_archive_t {
59 const char *suffix; 59 const char *suffix;
60 const char *mimetype; 60 const char *mimetype;
61 write_archive_fn_t write_func; 61 write_archive_fn_t write_func;
62 int bit; 62 int bit;
63 }snapshot_archives[] = { 63 }snapshot_archives[] = {
64 { ".zip", "application/x-zip", write_zip_archive, 0x1 }, 64 { ".zip", "application/x-zip", write_zip_archive, 0x1 },
65 { ".tar.gz", "application/x-tar", write_tar_gzip_archive, 0x2 }, 65 { ".tar.gz", "application/x-tar", write_tar_gzip_archive, 0x2 },
66 { ".tar.bz2", "application/x-tar", write_tar_bzip2_archive, 0x4 }, 66 { ".tar.bz2", "application/x-tar", write_tar_bzip2_archive, 0x4 },
67 { ".tar", "application/x-tar", write_tar_archive, 0x8 } 67 { ".tar", "application/x-tar", write_tar_archive, 0x8 }
68}; 68};
69 69
70#define snapshot_archives_len (sizeof(snapshot_archives) / sizeof(*snapshot_archives)) 70#define snapshot_archives_len (sizeof(snapshot_archives) / sizeof(*snapshot_archives))
71 71
72void cgit_print_snapshot(struct cacheitem *item, const char *head, 72void cgit_print_snapshot(const char *head, const char *hex, const char *prefix,
73 const char *hex, const char *prefix,
74 const char *filename, int snapshots) 73 const char *filename, int snapshots)
75{ 74{
76 const struct snapshot_archive_t* sat; 75 const struct snapshot_archive_t* sat;
77 struct archiver_args args; 76 struct archiver_args args;
78 struct commit *commit; 77 struct commit *commit;
79 unsigned char sha1[20]; 78 unsigned char sha1[20];
80 int f, sl, fnl = strlen(filename); 79 int f, sl, fnl = strlen(filename);
81 80
82 for(f=0; f<snapshot_archives_len; f++) { 81 for(f=0; f<snapshot_archives_len; f++) {
83 sat = &snapshot_archives[f]; 82 sat = &snapshot_archives[f];
84 if(!(snapshots & sat->bit)) 83 if(!(snapshots & sat->bit))
85 continue; 84 continue;
86 sl = strlen(sat->suffix); 85 sl = strlen(sat->suffix);
87 if(fnl<sl || strcmp(&filename[fnl-sl],sat->suffix)) 86 if(fnl<sl || strcmp(&filename[fnl-sl],sat->suffix))
88 continue; 87 continue;
89 if (!hex) 88 if (!hex)