|
diff --git a/cgit.h b/cgit.h index 2f3fca1..b93e2e8 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -4,51 +4,50 @@ |
4 | |
4 | |
5 | #include <git-compat-util.h> |
5 | #include <git-compat-util.h> |
6 | #include <cache.h> |
6 | #include <cache.h> |
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_VIEW 5 |
28 | #define CMD_BLOB 5 |
29 | #define CMD_BLOB 6 |
29 | #define CMD_SNAPSHOT 6 |
30 | #define CMD_SNAPSHOT 7 |
| |
31 | |
30 | |
32 | |
31 | |
33 | /* |
32 | /* |
34 | * Dateformats used on misc. pages |
33 | * Dateformats used on misc. pages |
35 | */ |
34 | */ |
36 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S" |
35 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S" |
37 | #define FMT_SHORTDATE "%Y-%m-%d" |
36 | #define FMT_SHORTDATE "%Y-%m-%d" |
38 | |
37 | |
39 | |
38 | |
40 | /* |
39 | /* |
41 | * Limits used for relative dates |
40 | * Limits used for relative dates |
42 | */ |
41 | */ |
43 | #define TM_MIN 60 |
42 | #define TM_MIN 60 |
44 | #define TM_HOUR (TM_MIN * 60) |
43 | #define TM_HOUR (TM_MIN * 60) |
45 | #define TM_DAY (TM_HOUR * 24) |
44 | #define TM_DAY (TM_HOUR * 24) |
46 | #define TM_WEEK (TM_DAY * 7) |
45 | #define TM_WEEK (TM_DAY * 7) |
47 | #define TM_YEAR (TM_DAY * 365) |
46 | #define TM_YEAR (TM_DAY * 365) |
48 | #define TM_MONTH (TM_YEAR / 12.0) |
47 | #define TM_MONTH (TM_YEAR / 12.0) |
49 | |
48 | |
50 | |
49 | |
51 | typedef void (*configfn)(const char *name, const char *value); |
50 | typedef void (*configfn)(const char *name, const char *value); |
52 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
51 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
53 | typedef void (*linediff_fn)(char *line, int len); |
52 | typedef void (*linediff_fn)(char *line, int len); |
54 | |
53 | |
@@ -194,35 +193,34 @@ extern void cgit_parse_url(const char *url); |
194 | extern char *cache_safe_filename(const char *unsafe); |
193 | extern char *cache_safe_filename(const char *unsafe); |
195 | extern int cache_lock(struct cacheitem *item); |
194 | extern int cache_lock(struct cacheitem *item); |
196 | extern int cache_unlock(struct cacheitem *item); |
195 | extern int cache_unlock(struct cacheitem *item); |
197 | extern int cache_cancel_lock(struct cacheitem *item); |
196 | extern int cache_cancel_lock(struct cacheitem *item); |
198 | extern int cache_exist(struct cacheitem *item); |
197 | extern int cache_exist(struct cacheitem *item); |
199 | extern int cache_expired(struct cacheitem *item); |
198 | extern int cache_expired(struct cacheitem *item); |
200 | |
199 | |
201 | extern char *cgit_repourl(const char *reponame); |
200 | extern char *cgit_repourl(const char *reponame); |
202 | extern char *cgit_pageurl(const char *reponame, const char *pagename, |
201 | extern char *cgit_pageurl(const char *reponame, const char *pagename, |
203 | const char *query); |
202 | const char *query); |
204 | |
203 | |
205 | extern void cgit_print_error(char *msg); |
204 | extern void cgit_print_error(char *msg); |
206 | extern void cgit_print_date(time_t secs, char *format); |
205 | extern void cgit_print_date(time_t secs, char *format); |
207 | extern void cgit_print_age(time_t t, time_t max_relative, char *format); |
206 | extern void cgit_print_age(time_t t, time_t max_relative, char *format); |
208 | extern void cgit_print_docstart(char *title, struct cacheitem *item); |
207 | extern void cgit_print_docstart(char *title, struct cacheitem *item); |
209 | extern void cgit_print_docend(); |
208 | extern void cgit_print_docend(); |
210 | extern void cgit_print_pageheader(char *title, int show_search); |
209 | extern void cgit_print_pageheader(char *title, int show_search); |
211 | extern void cgit_print_snapshot_start(const char *mimetype, |
210 | extern void cgit_print_snapshot_start(const char *mimetype, |
212 | const char *filename, |
211 | const char *filename, |
213 | struct cacheitem *item); |
212 | struct cacheitem *item); |
214 | |
213 | |
215 | extern void cgit_print_repolist(struct cacheitem *item); |
214 | extern void cgit_print_repolist(struct cacheitem *item); |
216 | extern void cgit_print_summary(); |
215 | extern void cgit_print_summary(); |
217 | extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path, int pager); |
216 | extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path, int pager); |
218 | extern void cgit_print_view(const char *hex, char *path); |
| |
219 | extern void cgit_print_blob(struct cacheitem *item, const char *hex, char *path); |
217 | extern void cgit_print_blob(struct cacheitem *item, const char *hex, char *path); |
220 | extern void cgit_print_tree(const char *rev, const char *hex, char *path); |
218 | extern void cgit_print_tree(const char *rev, char *path); |
221 | extern void cgit_print_commit(const char *hex); |
219 | extern void cgit_print_commit(const char *hex); |
222 | extern void cgit_print_diff(const char *head, const char *old_hex, const char *new_hex, |
220 | extern void cgit_print_diff(const char *head, const char *old_hex, const char *new_hex, |
223 | char *path); |
221 | char *path); |
224 | extern void cgit_print_snapshot(struct cacheitem *item, const char *hex, |
222 | extern void cgit_print_snapshot(struct cacheitem *item, const char *hex, |
225 | const char *format, const char *prefix, |
223 | const char *format, const char *prefix, |
226 | const char *filename); |
224 | const char *filename); |
227 | |
225 | |
228 | #endif /* CGIT_H */ |
226 | #endif /* CGIT_H */ |
|