diff options
Diffstat (limited to 'cgit.h')
-rw-r--r-- | cgit.h | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -29,6 +29,25 @@ | |||
29 | #define CMD_BLOB 6 | 29 | #define CMD_BLOB 6 |
30 | #define CMD_SNAPSHOT 7 | 30 | #define CMD_SNAPSHOT 7 |
31 | 31 | ||
32 | |||
33 | /* | ||
34 | * Dateformats used on misc. pages | ||
35 | */ | ||
36 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S" | ||
37 | #define FMT_SHORTDATE "%Y-%m-%d" | ||
38 | |||
39 | |||
40 | /* | ||
41 | * Limits used for relative dates | ||
42 | */ | ||
43 | #define TM_MIN 60 | ||
44 | #define TM_HOUR (TM_MIN * 60) | ||
45 | #define TM_DAY (TM_HOUR * 24) | ||
46 | #define TM_WEEK (TM_DAY * 7) | ||
47 | #define TM_YEAR (TM_DAY * 365) | ||
48 | #define TM_MONTH (TM_YEAR / 12.0) | ||
49 | |||
50 | |||
32 | typedef void (*configfn)(const char *name, const char *value); | 51 | typedef void (*configfn)(const char *name, const char *value); |
33 | typedef void (*filepair_fn)(struct diff_filepair *pair); | 52 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
34 | typedef void (*linediff_fn)(char *line, int len); | 53 | typedef void (*linediff_fn)(char *line, int len); |
@@ -181,7 +200,8 @@ extern char *cgit_pageurl(const char *reponame, const char *pagename, | |||
181 | const char *query); | 200 | const char *query); |
182 | 201 | ||
183 | extern void cgit_print_error(char *msg); | 202 | extern void cgit_print_error(char *msg); |
184 | extern void cgit_print_date(unsigned long secs); | 203 | extern void cgit_print_date(time_t secs, char *format); |
204 | extern void cgit_print_age(time_t t, time_t max_relative, char *format); | ||
185 | extern void cgit_print_docstart(char *title, struct cacheitem *item); | 205 | extern void cgit_print_docstart(char *title, struct cacheitem *item); |
186 | extern void cgit_print_docend(); | 206 | extern void cgit_print_docend(); |
187 | extern void cgit_print_pageheader(char *title, int show_search); | 207 | extern void cgit_print_pageheader(char *title, int show_search); |