|
diff --git a/cgit.h b/cgit.h index 163f355..6291c58 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -7,24 +7,25 @@ |
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 | #include <utf8.h> |
19 | |
20 | |
20 | |
21 | |
21 | /* |
22 | /* |
22 | * The valid cgit repo-commands |
23 | * The valid cgit repo-commands |
23 | */ |
24 | */ |
24 | #define CMD_LOG 1 |
25 | #define CMD_LOG 1 |
25 | #define CMD_COMMIT 2 |
26 | #define CMD_COMMIT 2 |
26 | #define CMD_DIFF 3 |
27 | #define CMD_DIFF 3 |
27 | #define CMD_TREE 4 |
28 | #define CMD_TREE 4 |
28 | #define CMD_BLOB 5 |
29 | #define CMD_BLOB 5 |
29 | #define CMD_SNAPSHOT 6 |
30 | #define CMD_SNAPSHOT 6 |
30 | #define CMD_TAG 7 |
31 | #define CMD_TAG 7 |
@@ -39,24 +40,29 @@ |
39 | |
40 | |
40 | /* |
41 | /* |
41 | * Limits used for relative dates |
42 | * Limits used for relative dates |
42 | */ |
43 | */ |
43 | #define TM_MIN 60 |
44 | #define TM_MIN 60 |
44 | #define TM_HOUR (TM_MIN * 60) |
45 | #define TM_HOUR (TM_MIN * 60) |
45 | #define TM_DAY (TM_HOUR * 24) |
46 | #define TM_DAY (TM_HOUR * 24) |
46 | #define TM_WEEK (TM_DAY * 7) |
47 | #define TM_WEEK (TM_DAY * 7) |
47 | #define TM_YEAR (TM_DAY * 365) |
48 | #define TM_YEAR (TM_DAY * 365) |
48 | #define TM_MONTH (TM_YEAR / 12.0) |
49 | #define TM_MONTH (TM_YEAR / 12.0) |
49 | |
50 | |
50 | |
51 | |
| |
52 | /* |
| |
53 | * Default encoding |
| |
54 | */ |
| |
55 | #define PAGE_ENCODING "UTF-8" |
| |
56 | |
51 | typedef void (*configfn)(const char *name, const char *value); |
57 | typedef void (*configfn)(const char *name, const char *value); |
52 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
58 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
53 | typedef void (*linediff_fn)(char *line, int len); |
59 | typedef void (*linediff_fn)(char *line, int len); |
54 | |
60 | |
55 | struct cacheitem { |
61 | struct cacheitem { |
56 | char *name; |
62 | char *name; |
57 | struct stat st; |
63 | struct stat st; |
58 | int ttl; |
64 | int ttl; |
59 | int fd; |
65 | int fd; |
60 | }; |
66 | }; |
61 | |
67 | |
62 | struct repoinfo { |
68 | struct repoinfo { |
@@ -81,24 +87,25 @@ struct repolist { |
81 | }; |
87 | }; |
82 | |
88 | |
83 | struct commitinfo { |
89 | struct commitinfo { |
84 | struct commit *commit; |
90 | struct commit *commit; |
85 | char *author; |
91 | char *author; |
86 | char *author_email; |
92 | char *author_email; |
87 | unsigned long author_date; |
93 | unsigned long author_date; |
88 | char *committer; |
94 | char *committer; |
89 | char *committer_email; |
95 | char *committer_email; |
90 | unsigned long committer_date; |
96 | unsigned long committer_date; |
91 | char *subject; |
97 | char *subject; |
92 | char *msg; |
98 | char *msg; |
| |
99 | char *msg_encoding; |
93 | }; |
100 | }; |
94 | |
101 | |
95 | struct taginfo { |
102 | struct taginfo { |
96 | char *tagger; |
103 | char *tagger; |
97 | char *tagger_email; |
104 | char *tagger_email; |
98 | int tagger_date; |
105 | int tagger_date; |
99 | char *msg; |
106 | char *msg; |
100 | }; |
107 | }; |
101 | |
108 | |
102 | struct refinfo { |
109 | struct refinfo { |
103 | const char *refname; |
110 | const char *refname; |
104 | struct object *object; |
111 | struct object *object; |
|