|
diff --git a/cgit.h b/cgit.h index 0338ebd..598d8c3 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -57,44 +57,44 @@ |
57 | |
57 | |
58 | typedef void (*configfn)(const char *name, const char *value); |
58 | typedef void (*configfn)(const char *name, const char *value); |
59 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
59 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
60 | typedef void (*linediff_fn)(char *line, int len); |
60 | typedef void (*linediff_fn)(char *line, int len); |
61 | |
61 | |
62 | struct cacheitem { |
62 | struct cacheitem { |
63 | char *name; |
63 | char *name; |
64 | struct stat st; |
64 | struct stat st; |
65 | int ttl; |
65 | int ttl; |
66 | int fd; |
66 | int fd; |
67 | }; |
67 | }; |
68 | |
68 | |
69 | struct repoinfo { |
69 | struct cgit_repo { |
70 | char *url; |
70 | char *url; |
71 | char *name; |
71 | char *name; |
72 | char *path; |
72 | char *path; |
73 | char *desc; |
73 | char *desc; |
74 | char *owner; |
74 | char *owner; |
75 | char *defbranch; |
75 | char *defbranch; |
76 | char *group; |
76 | char *group; |
77 | char *module_link; |
77 | char *module_link; |
78 | char *readme; |
78 | char *readme; |
79 | char *clone_url; |
79 | char *clone_url; |
80 | int snapshots; |
80 | int snapshots; |
81 | int enable_log_filecount; |
81 | int enable_log_filecount; |
82 | int enable_log_linecount; |
82 | int enable_log_linecount; |
83 | }; |
83 | }; |
84 | |
84 | |
85 | struct repolist { |
85 | struct cgit_repolist { |
86 | int length; |
86 | int length; |
87 | int count; |
87 | int count; |
88 | struct repoinfo *repos; |
88 | struct cgit_repo *repos; |
89 | }; |
89 | }; |
90 | |
90 | |
91 | struct commitinfo { |
91 | struct commitinfo { |
92 | struct commit *commit; |
92 | struct commit *commit; |
93 | char *author; |
93 | char *author; |
94 | char *author_email; |
94 | char *author_email; |
95 | unsigned long author_date; |
95 | unsigned long author_date; |
96 | char *committer; |
96 | char *committer; |
97 | char *committer_email; |
97 | char *committer_email; |
98 | unsigned long committer_date; |
98 | unsigned long committer_date; |
99 | char *subject; |
99 | char *subject; |
100 | char *msg; |
100 | char *msg; |
@@ -168,38 +168,38 @@ struct cgit_config { |
168 | int max_repodesc_len; |
168 | int max_repodesc_len; |
169 | int nocache; |
169 | int nocache; |
170 | int renamelimit; |
170 | int renamelimit; |
171 | int snapshots; |
171 | int snapshots; |
172 | int summary_branches; |
172 | int summary_branches; |
173 | int summary_log; |
173 | int summary_log; |
174 | int summary_tags; |
174 | int summary_tags; |
175 | }; |
175 | }; |
176 | |
176 | |
177 | struct cgit_context { |
177 | struct cgit_context { |
178 | struct cgit_query qry; |
178 | struct cgit_query qry; |
179 | struct cgit_config cfg; |
179 | struct cgit_config cfg; |
| |
180 | struct cgit_repo *repo; |
180 | }; |
181 | }; |
181 | |
182 | |
182 | extern const char *cgit_version; |
183 | extern const char *cgit_version; |
183 | |
184 | |
184 | extern struct repolist cgit_repolist; |
185 | extern struct cgit_repolist cgit_repolist; |
185 | extern struct repoinfo *cgit_repo; |
| |
186 | extern struct cgit_context ctx; |
186 | extern struct cgit_context ctx; |
187 | extern int cgit_cmd; |
187 | extern int cgit_cmd; |
188 | |
188 | |
189 | extern int htmlfd; |
189 | extern int htmlfd; |
190 | |
190 | |
191 | extern void cgit_prepare_context(struct cgit_context *ctx); |
191 | extern void cgit_prepare_context(struct cgit_context *ctx); |
192 | extern int cgit_get_cmd_index(const char *cmd); |
192 | extern int cgit_get_cmd_index(const char *cmd); |
193 | extern struct repoinfo *cgit_get_repoinfo(const char *url); |
193 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
194 | extern void cgit_global_config_cb(const char *name, const char *value); |
194 | extern void cgit_global_config_cb(const char *name, const char *value); |
195 | extern void cgit_repo_config_cb(const char *name, const char *value); |
195 | extern void cgit_repo_config_cb(const char *name, const char *value); |
196 | extern void cgit_querystring_cb(const char *name, const char *value); |
196 | extern void cgit_querystring_cb(const char *name, const char *value); |
197 | |
197 | |
198 | extern int chk_zero(int result, char *msg); |
198 | extern int chk_zero(int result, char *msg); |
199 | extern int chk_positive(int result, char *msg); |
199 | extern int chk_positive(int result, char *msg); |
200 | extern int chk_non_negative(int result, char *msg); |
200 | extern int chk_non_negative(int result, char *msg); |
201 | |
201 | |
202 | extern int hextoint(char c); |
202 | extern int hextoint(char c); |
203 | extern char *trim_end(const char *str, char c); |
203 | extern char *trim_end(const char *str, char c); |
204 | extern char *strlpart(char *txt, int maxlen); |
204 | extern char *strlpart(char *txt, int maxlen); |
205 | extern char *strrpart(char *txt, int maxlen); |
205 | extern char *strrpart(char *txt, int maxlen); |
|