|
diff --git a/cgit.h b/cgit.h index 2b28d63..2bf6ab0 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -241,65 +241,67 @@ struct cgit_context { |
241 | struct cgit_environment env; |
241 | struct cgit_environment env; |
242 | struct cgit_query qry; |
242 | struct cgit_query qry; |
243 | struct cgit_config cfg; |
243 | struct cgit_config cfg; |
244 | struct cgit_repo *repo; |
244 | struct cgit_repo *repo; |
245 | struct cgit_page page; |
245 | struct cgit_page page; |
246 | }; |
246 | }; |
247 | |
247 | |
248 | struct cgit_snapshot_format { |
248 | struct cgit_snapshot_format { |
249 | const char *suffix; |
249 | const char *suffix; |
250 | const char *mimetype; |
250 | const char *mimetype; |
251 | write_archive_fn_t write_func; |
251 | write_archive_fn_t write_func; |
252 | int bit; |
252 | int bit; |
253 | }; |
253 | }; |
254 | |
254 | |
255 | extern const char *cgit_version; |
255 | extern const char *cgit_version; |
256 | |
256 | |
257 | extern struct cgit_repolist cgit_repolist; |
257 | extern struct cgit_repolist cgit_repolist; |
258 | extern struct cgit_context ctx; |
258 | extern struct cgit_context ctx; |
259 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; |
259 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; |
260 | |
260 | |
261 | extern struct cgit_repo *cgit_add_repo(const char *url); |
261 | extern struct cgit_repo *cgit_add_repo(const char *url); |
262 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
262 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
263 | extern void cgit_repo_config_cb(const char *name, const char *value); |
263 | extern void cgit_repo_config_cb(const char *name, const char *value); |
264 | |
264 | |
265 | extern int chk_zero(int result, char *msg); |
265 | extern int chk_zero(int result, char *msg); |
266 | extern int chk_positive(int result, char *msg); |
266 | extern int chk_positive(int result, char *msg); |
267 | extern int chk_non_negative(int result, char *msg); |
267 | extern int chk_non_negative(int result, char *msg); |
268 | |
268 | |
269 | extern char *trim_end(const char *str, char c); |
269 | extern char *trim_end(const char *str, char c); |
270 | extern char *strlpart(char *txt, int maxlen); |
270 | extern char *strlpart(char *txt, int maxlen); |
271 | extern char *strrpart(char *txt, int maxlen); |
271 | extern char *strrpart(char *txt, int maxlen); |
272 | |
272 | |
273 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); |
273 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); |
274 | extern int cgit_refs_cb(const char *refname, const unsigned char *sha1, |
274 | extern int cgit_refs_cb(const char *refname, const unsigned char *sha1, |
275 | int flags, void *cb_data); |
275 | int flags, void *cb_data); |
276 | |
276 | |
277 | extern void *cgit_free_commitinfo(struct commitinfo *info); |
277 | extern void *cgit_free_commitinfo(struct commitinfo *info); |
278 | |
278 | |
279 | extern int cgit_diff_files(const unsigned char *old_sha1, |
279 | extern int cgit_diff_files(const unsigned char *old_sha1, |
280 | const unsigned char *new_sha1, |
280 | const unsigned char *new_sha1, |
281 | unsigned long *old_size, unsigned long *new_size, |
281 | unsigned long *old_size, unsigned long *new_size, |
282 | int *binary, int context, linediff_fn fn); |
282 | int *binary, int context, linediff_fn fn); |
283 | |
283 | |
284 | extern void cgit_diff_tree(const unsigned char *old_sha1, |
284 | extern void cgit_diff_tree(const unsigned char *old_sha1, |
285 | const unsigned char *new_sha1, |
285 | const unsigned char *new_sha1, |
286 | filepair_fn fn, const char *prefix); |
286 | filepair_fn fn, const char *prefix); |
287 | |
287 | |
288 | extern void cgit_diff_commit(struct commit *commit, filepair_fn fn); |
288 | extern void cgit_diff_commit(struct commit *commit, filepair_fn fn); |
289 | |
289 | |
290 | extern char *fmt(const char *format,...); |
290 | extern char *fmt(const char *format,...); |
291 | |
291 | |
292 | extern struct commitinfo *cgit_parse_commit(struct commit *commit); |
292 | extern struct commitinfo *cgit_parse_commit(struct commit *commit); |
293 | extern struct taginfo *cgit_parse_tag(struct tag *tag); |
293 | extern struct taginfo *cgit_parse_tag(struct tag *tag); |
294 | extern void cgit_parse_url(const char *url); |
294 | extern void cgit_parse_url(const char *url); |
295 | |
295 | |
296 | extern const char *cgit_repobasename(const char *reponame); |
296 | extern const char *cgit_repobasename(const char *reponame); |
297 | |
297 | |
298 | extern int cgit_parse_snapshots_mask(const char *str); |
298 | extern int cgit_parse_snapshots_mask(const char *str); |
299 | |
299 | |
300 | extern int cgit_open_filter(struct cgit_filter *filter); |
300 | extern int cgit_open_filter(struct cgit_filter *filter); |
301 | extern int cgit_close_filter(struct cgit_filter *filter); |
301 | extern int cgit_close_filter(struct cgit_filter *filter); |
302 | |
302 | |
303 | extern int readfile(const char *path, char **buf, size_t *size); |
303 | extern int readfile(const char *path, char **buf, size_t *size); |
304 | |
304 | |
| |
305 | extern char *expand_macros(const char *txt); |
| |
306 | |
305 | #endif /* CGIT_H */ |
307 | #endif /* CGIT_H */ |
|