diff options
author | Lars Hjemli <hjemli@gmail.com> | 2007-02-08 21:53:13 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-02-08 21:58:58 (JST) |
commit | ab2ab95f09994560f62fd631f07d3b6e3577aa6e (patch) | |
tree | 846763c1bcb78bd27dc37c99e5f6d703ca5ab179 /cgit.h | |
parent | 14d360df60f059b9b5b045fc6df1eec6f0966d9a (diff) | |
download | cgit-ab2ab95f09994560f62fd631f07d3b6e3577aa6e.zip cgit-ab2ab95f09994560f62fd631f07d3b6e3577aa6e.tar.gz |
Add support for snapshots
Make a link from the commit viewer to a snapshot of the corresponding tree.
Currently only zip-format is supported.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h')
-rw-r--r-- | cgit.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -85,6 +85,7 @@ extern char *cgit_query_head; | |||
85 | extern char *cgit_query_sha1; | 85 | extern char *cgit_query_sha1; |
86 | extern char *cgit_query_sha2; | 86 | extern char *cgit_query_sha2; |
87 | extern char *cgit_query_path; | 87 | extern char *cgit_query_path; |
88 | extern char *cgit_query_name; | ||
88 | extern int cgit_query_ofs; | 89 | extern int cgit_query_ofs; |
89 | 90 | ||
90 | extern int htmlfd; | 91 | extern int htmlfd; |
@@ -93,6 +94,9 @@ extern void cgit_global_config_cb(const char *name, const char *value); | |||
93 | extern void cgit_repo_config_cb(const char *name, const char *value); | 94 | extern void cgit_repo_config_cb(const char *name, const char *value); |
94 | extern void cgit_querystring_cb(const char *name, const char *value); | 95 | extern void cgit_querystring_cb(const char *name, const char *value); |
95 | 96 | ||
97 | extern int chk_zero(int result, char *msg); | ||
98 | extern int chk_positive(int result, char *msg); | ||
99 | |||
96 | extern int hextoint(char c); | 100 | extern int hextoint(char c); |
97 | 101 | ||
98 | extern void *cgit_free_commitinfo(struct commitinfo *info); | 102 | extern void *cgit_free_commitinfo(struct commitinfo *info); |
@@ -130,6 +134,9 @@ extern void cgit_print_date(unsigned long secs); | |||
130 | extern void cgit_print_docstart(char *title, struct cacheitem *item); | 134 | extern void cgit_print_docstart(char *title, struct cacheitem *item); |
131 | extern void cgit_print_docend(); | 135 | extern void cgit_print_docend(); |
132 | extern void cgit_print_pageheader(char *title, int show_search); | 136 | extern void cgit_print_pageheader(char *title, int show_search); |
137 | extern void cgit_print_snapshot_start(const char *mimetype, | ||
138 | const char *filename, | ||
139 | struct cacheitem *item); | ||
133 | 140 | ||
134 | extern void cgit_print_repolist(struct cacheitem *item); | 141 | extern void cgit_print_repolist(struct cacheitem *item); |
135 | extern void cgit_print_summary(); | 142 | extern void cgit_print_summary(); |
@@ -138,5 +145,8 @@ extern void cgit_print_view(const char *hex); | |||
138 | extern void cgit_print_tree(const char *hex, char *path); | 145 | extern void cgit_print_tree(const char *hex, char *path); |
139 | extern void cgit_print_commit(const char *hex); | 146 | extern void cgit_print_commit(const char *hex); |
140 | extern void cgit_print_diff(const char *old_hex, const char *new_hex); | 147 | extern void cgit_print_diff(const char *old_hex, const char *new_hex); |
148 | extern void cgit_print_snapshot(struct cacheitem *item, const char *hex, | ||
149 | const char *format, const char *prefix, | ||
150 | const char *filename); | ||
141 | 151 | ||
142 | #endif /* CGIT_H */ | 152 | #endif /* CGIT_H */ |