summaryrefslogtreecommitdiff
path: root/cgit.h
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-02-08 13:53:13 +0100
committerLars Hjemli <hjemli@gmail.com>2007-02-08 13:58:58 +0100
commitab2ab95f09994560f62fd631f07d3b6e3577aa6e (patch)
tree846763c1bcb78bd27dc37c99e5f6d703ca5ab179 /cgit.h
parent14d360df60f059b9b5b045fc6df1eec6f0966d9a (diff)
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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index 2a3cd5a..03c2fdb 100644
--- a/cgit.h
+++ b/cgit.h
@@ -85,6 +85,7 @@ extern char *cgit_query_head;
extern char *cgit_query_sha1;
extern char *cgit_query_sha2;
extern char *cgit_query_path;
+extern char *cgit_query_name;
extern int cgit_query_ofs;
extern int htmlfd;
@@ -93,6 +94,9 @@ extern void cgit_global_config_cb(const char *name, const char *value);
extern void cgit_repo_config_cb(const char *name, const char *value);
extern void cgit_querystring_cb(const char *name, const char *value);
+extern int chk_zero(int result, char *msg);
+extern int chk_positive(int result, char *msg);
+
extern int hextoint(char c);
extern void *cgit_free_commitinfo(struct commitinfo *info);
@@ -130,6 +134,9 @@ extern void cgit_print_date(unsigned long secs);
extern void cgit_print_docstart(char *title, struct cacheitem *item);
extern void cgit_print_docend();
extern void cgit_print_pageheader(char *title, int show_search);
+extern void cgit_print_snapshot_start(const char *mimetype,
+ const char *filename,
+ struct cacheitem *item);
extern void cgit_print_repolist(struct cacheitem *item);
extern void cgit_print_summary();
@@ -138,5 +145,8 @@ extern void cgit_print_view(const char *hex);
extern void cgit_print_tree(const char *hex, char *path);
extern void cgit_print_commit(const char *hex);
extern void cgit_print_diff(const char *old_hex, const char *new_hex);
+extern void cgit_print_snapshot(struct cacheitem *item, const char *hex,
+ const char *format, const char *prefix,
+ const char *filename);
#endif /* CGIT_H */