|
diff --git a/cgit.h b/cgit.h index a1fe527..d9a15f4 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -7,48 +7,49 @@ |
7 | #include <grep.h> |
7 | #include <grep.h> |
8 | #include <object.h> |
8 | #include <object.h> |
9 | #include <tree.h> |
9 | #include <tree.h> |
10 | #include <commit.h> |
10 | #include <commit.h> |
11 | #include <tag.h> |
11 | #include <tag.h> |
12 | #include <diff.h> |
12 | #include <diff.h> |
13 | #include <diffcore.h> |
13 | #include <diffcore.h> |
14 | #include <refs.h> |
14 | #include <refs.h> |
15 | #include <revision.h> |
15 | #include <revision.h> |
16 | #include <log-tree.h> |
16 | #include <log-tree.h> |
17 | #include <archive.h> |
17 | #include <archive.h> |
18 | #include <xdiff/xdiff.h> |
18 | #include <xdiff/xdiff.h> |
19 | |
19 | |
20 | |
20 | |
21 | /* |
21 | /* |
22 | * The valid cgit repo-commands |
22 | * The valid cgit repo-commands |
23 | */ |
23 | */ |
24 | #define CMD_LOG 1 |
24 | #define CMD_LOG 1 |
25 | #define CMD_COMMIT 2 |
25 | #define CMD_COMMIT 2 |
26 | #define CMD_DIFF 3 |
26 | #define CMD_DIFF 3 |
27 | #define CMD_TREE 4 |
27 | #define CMD_TREE 4 |
28 | #define CMD_BLOB 5 |
28 | #define CMD_BLOB 5 |
29 | #define CMD_SNAPSHOT 6 |
29 | #define CMD_SNAPSHOT 6 |
30 | #define CMD_TAG 7 |
30 | #define CMD_TAG 7 |
| |
31 | #define CMD_REFS 8 |
31 | |
32 | |
32 | /* |
33 | /* |
33 | * Dateformats used on misc. pages |
34 | * Dateformats used on misc. pages |
34 | */ |
35 | */ |
35 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S" |
36 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S" |
36 | #define FMT_SHORTDATE "%Y-%m-%d" |
37 | #define FMT_SHORTDATE "%Y-%m-%d" |
37 | |
38 | |
38 | |
39 | |
39 | /* |
40 | /* |
40 | * Limits used for relative dates |
41 | * Limits used for relative dates |
41 | */ |
42 | */ |
42 | #define TM_MIN 60 |
43 | #define TM_MIN 60 |
43 | #define TM_HOUR (TM_MIN * 60) |
44 | #define TM_HOUR (TM_MIN * 60) |
44 | #define TM_DAY (TM_HOUR * 24) |
45 | #define TM_DAY (TM_HOUR * 24) |
45 | #define TM_WEEK (TM_DAY * 7) |
46 | #define TM_WEEK (TM_DAY * 7) |
46 | #define TM_YEAR (TM_DAY * 365) |
47 | #define TM_YEAR (TM_DAY * 365) |
47 | #define TM_MONTH (TM_YEAR / 12.0) |
48 | #define TM_MONTH (TM_YEAR / 12.0) |
48 | |
49 | |
49 | |
50 | |
50 | typedef void (*configfn)(const char *name, const char *value); |
51 | typedef void (*configfn)(const char *name, const char *value); |
51 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
52 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
52 | typedef void (*linediff_fn)(char *line, int len); |
53 | typedef void (*linediff_fn)(char *line, int len); |
53 | |
54 | |
54 | struct cacheitem { |
55 | struct cacheitem { |
@@ -239,34 +240,35 @@ extern void cgit_snapshot_link(char *name, char *title, char *class, |
239 | char *head, char *rev, char *archivename); |
240 | char *head, char *rev, char *archivename); |
240 | extern void cgit_diff_link(char *name, char *title, char *class, char *head, |
241 | extern void cgit_diff_link(char *name, char *title, char *class, char *head, |
241 | char *new_rev, char *old_rev, char *path); |
242 | char *new_rev, char *old_rev, char *path); |
242 | |
243 | |
243 | extern void cgit_object_link(struct object *obj); |
244 | extern void cgit_object_link(struct object *obj); |
244 | |
245 | |
245 | extern void cgit_print_error(char *msg); |
246 | extern void cgit_print_error(char *msg); |
246 | extern void cgit_print_date(time_t secs, char *format); |
247 | extern void cgit_print_date(time_t secs, char *format); |
247 | extern void cgit_print_age(time_t t, time_t max_relative, char *format); |
248 | extern void cgit_print_age(time_t t, time_t max_relative, char *format); |
248 | extern void cgit_print_docstart(char *title, struct cacheitem *item); |
249 | extern void cgit_print_docstart(char *title, struct cacheitem *item); |
249 | extern void cgit_print_docend(); |
250 | extern void cgit_print_docend(); |
250 | extern void cgit_print_pageheader(char *title, int show_search); |
251 | extern void cgit_print_pageheader(char *title, int show_search); |
251 | extern void cgit_print_snapshot_start(const char *mimetype, |
252 | extern void cgit_print_snapshot_start(const char *mimetype, |
252 | const char *filename, |
253 | const char *filename, |
253 | struct cacheitem *item); |
254 | struct cacheitem *item); |
254 | extern void cgit_print_branches(int maxcount); |
255 | extern void cgit_print_branches(int maxcount); |
255 | extern void cgit_print_tags(int maxcount); |
256 | extern void cgit_print_tags(int maxcount); |
256 | |
257 | |
257 | extern void cgit_print_repolist(struct cacheitem *item); |
258 | extern void cgit_print_repolist(struct cacheitem *item); |
258 | extern void cgit_print_summary(); |
259 | extern void cgit_print_summary(); |
259 | extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path, int pager); |
260 | extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path, int pager); |
260 | extern void cgit_print_blob(struct cacheitem *item, const char *hex, char *path); |
261 | extern void cgit_print_blob(struct cacheitem *item, const char *hex, char *path); |
261 | extern void cgit_print_tree(const char *rev, char *path); |
262 | extern void cgit_print_tree(const char *rev, char *path); |
262 | extern void cgit_print_commit(char *hex); |
263 | extern void cgit_print_commit(char *hex); |
| |
264 | extern void cgit_print_refs(); |
263 | extern void cgit_print_tag(char *revname); |
265 | extern void cgit_print_tag(char *revname); |
264 | extern void cgit_print_diff(const char *new_hex, const char *old_hex, const char *prefix); |
266 | extern void cgit_print_diff(const char *new_hex, const char *old_hex, const char *prefix); |
265 | extern void cgit_print_snapshot(struct cacheitem *item, const char *head, |
267 | extern void cgit_print_snapshot(struct cacheitem *item, const char *head, |
266 | const char *hex, const char *prefix, |
268 | const char *hex, const char *prefix, |
267 | const char *filename, int snapshot); |
269 | const char *filename, int snapshot); |
268 | extern void cgit_print_snapshot_links(const char *repo, const char *head, |
270 | extern void cgit_print_snapshot_links(const char *repo, const char *head, |
269 | const char *hex, int snapshots); |
271 | const char *hex, int snapshots); |
270 | extern int cgit_parse_snapshots_mask(const char *str); |
272 | extern int cgit_parse_snapshots_mask(const char *str); |
271 | |
273 | |
272 | #endif /* CGIT_H */ |
274 | #endif /* CGIT_H */ |
|