|
diff --git a/cgit.h b/cgit.h index d0fff1f..f9cf0df 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -138,96 +138,97 @@ struct cgit_filter { |
138 | int exitstatus; |
138 | int exitstatus; |
139 | }; |
139 | }; |
140 | |
140 | |
141 | struct cgit_config { |
141 | struct cgit_config { |
142 | char *agefile; |
142 | char *agefile; |
143 | char *cache_root; |
143 | char *cache_root; |
144 | char *clone_prefix; |
144 | char *clone_prefix; |
145 | char *css; |
145 | char *css; |
146 | char *favicon; |
146 | char *favicon; |
147 | char *footer; |
147 | char *footer; |
148 | char *head_include; |
148 | char *head_include; |
149 | char *header; |
149 | char *header; |
150 | char *index_header; |
150 | char *index_header; |
151 | char *index_info; |
151 | char *index_info; |
152 | char *logo; |
152 | char *logo; |
153 | char *logo_link; |
153 | char *logo_link; |
154 | char *module_link; |
154 | char *module_link; |
155 | char *repo_group; |
155 | char *repo_group; |
156 | char *robots; |
156 | char *robots; |
157 | char *root_title; |
157 | char *root_title; |
158 | char *root_desc; |
158 | char *root_desc; |
159 | char *root_readme; |
159 | char *root_readme; |
160 | char *script_name; |
160 | char *script_name; |
161 | char *virtual_root; |
161 | char *virtual_root; |
162 | int cache_size; |
162 | int cache_size; |
163 | int cache_dynamic_ttl; |
163 | int cache_dynamic_ttl; |
164 | int cache_max_create_time; |
164 | int cache_max_create_time; |
165 | int cache_repo_ttl; |
165 | int cache_repo_ttl; |
166 | int cache_root_ttl; |
166 | int cache_root_ttl; |
167 | int cache_static_ttl; |
167 | int cache_static_ttl; |
168 | int embedded; |
168 | int embedded; |
169 | int enable_index_links; |
169 | int enable_index_links; |
170 | int enable_log_filecount; |
170 | int enable_log_filecount; |
171 | int enable_log_linecount; |
171 | int enable_log_linecount; |
172 | int local_time; |
172 | int local_time; |
173 | int max_repo_count; |
173 | int max_repo_count; |
174 | int max_commit_count; |
174 | int max_commit_count; |
175 | int max_lock_attempts; |
175 | int max_lock_attempts; |
176 | int max_msg_len; |
176 | int max_msg_len; |
177 | int max_repodesc_len; |
177 | int max_repodesc_len; |
178 | int max_stats; |
178 | int max_stats; |
179 | int nocache; |
179 | int nocache; |
180 | int noheader; |
180 | int noheader; |
181 | int renamelimit; |
181 | int renamelimit; |
182 | int snapshots; |
182 | int snapshots; |
183 | int summary_branches; |
183 | int summary_branches; |
184 | int summary_log; |
184 | int summary_log; |
185 | int summary_tags; |
185 | int summary_tags; |
| |
186 | struct cgit_filter *source_filter; |
186 | }; |
187 | }; |
187 | |
188 | |
188 | struct cgit_page { |
189 | struct cgit_page { |
189 | time_t modified; |
190 | time_t modified; |
190 | time_t expires; |
191 | time_t expires; |
191 | size_t size; |
192 | size_t size; |
192 | char *mimetype; |
193 | char *mimetype; |
193 | char *charset; |
194 | char *charset; |
194 | char *filename; |
195 | char *filename; |
195 | char *etag; |
196 | char *etag; |
196 | char *title; |
197 | char *title; |
197 | int status; |
198 | int status; |
198 | char *statusmsg; |
199 | char *statusmsg; |
199 | }; |
200 | }; |
200 | |
201 | |
201 | struct cgit_context { |
202 | struct cgit_context { |
202 | struct cgit_query qry; |
203 | struct cgit_query qry; |
203 | struct cgit_config cfg; |
204 | struct cgit_config cfg; |
204 | struct cgit_repo *repo; |
205 | struct cgit_repo *repo; |
205 | struct cgit_page page; |
206 | struct cgit_page page; |
206 | }; |
207 | }; |
207 | |
208 | |
208 | struct cgit_snapshot_format { |
209 | struct cgit_snapshot_format { |
209 | const char *suffix; |
210 | const char *suffix; |
210 | const char *mimetype; |
211 | const char *mimetype; |
211 | write_archive_fn_t write_func; |
212 | write_archive_fn_t write_func; |
212 | int bit; |
213 | int bit; |
213 | }; |
214 | }; |
214 | |
215 | |
215 | extern const char *cgit_version; |
216 | extern const char *cgit_version; |
216 | |
217 | |
217 | extern struct cgit_repolist cgit_repolist; |
218 | extern struct cgit_repolist cgit_repolist; |
218 | extern struct cgit_context ctx; |
219 | extern struct cgit_context ctx; |
219 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; |
220 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; |
220 | |
221 | |
221 | extern struct cgit_repo *cgit_add_repo(const char *url); |
222 | extern struct cgit_repo *cgit_add_repo(const char *url); |
222 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
223 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
223 | extern void cgit_repo_config_cb(const char *name, const char *value); |
224 | extern void cgit_repo_config_cb(const char *name, const char *value); |
224 | |
225 | |
225 | extern int chk_zero(int result, char *msg); |
226 | extern int chk_zero(int result, char *msg); |
226 | extern int chk_positive(int result, char *msg); |
227 | extern int chk_positive(int result, char *msg); |
227 | extern int chk_non_negative(int result, char *msg); |
228 | extern int chk_non_negative(int result, char *msg); |
228 | |
229 | |
229 | extern char *trim_end(const char *str, char c); |
230 | extern char *trim_end(const char *str, char c); |
230 | extern char *strlpart(char *txt, int maxlen); |
231 | extern char *strlpart(char *txt, int maxlen); |
231 | extern char *strrpart(char *txt, int maxlen); |
232 | extern char *strrpart(char *txt, int maxlen); |
232 | |
233 | |
233 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); |
234 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); |
|