author | Lars Hjemli <hjemli@gmail.com> | 2010-07-18 13:03:08 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-07-18 13:03:08 (UTC) |
commit | 5c5d189635287a3bfaa1a4aef133dc0c582a27c2 (patch) (unidiff) | |
tree | cf14b0a5578c9d23a560690e7e256260633ce043 /cgit.h | |
parent | 60fcf600f5010701c20b63867999a802ca0e05c0 (diff) | |
parent | ba56a37e863d0f90e3e953047486905cfb959925 (diff) | |
download | cgit-5c5d189635287a3bfaa1a4aef133dc0c582a27c2.zip cgit-5c5d189635287a3bfaa1a4aef133dc0c582a27c2.tar.gz cgit-5c5d189635287a3bfaa1a4aef133dc0c582a27c2.tar.bz2 |
Merge branch 'lh/macros'
-rw-r--r-- | cgit.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -177,129 +177,131 @@ struct cgit_config { | |||
177 | int cache_max_create_time; | 177 | int cache_max_create_time; |
178 | int cache_repo_ttl; | 178 | int cache_repo_ttl; |
179 | int cache_root_ttl; | 179 | int cache_root_ttl; |
180 | int cache_scanrc_ttl; | 180 | int cache_scanrc_ttl; |
181 | int cache_static_ttl; | 181 | int cache_static_ttl; |
182 | int embedded; | 182 | int embedded; |
183 | int enable_filter_overrides; | 183 | int enable_filter_overrides; |
184 | int enable_index_links; | 184 | int enable_index_links; |
185 | int enable_log_filecount; | 185 | int enable_log_filecount; |
186 | int enable_log_linecount; | 186 | int enable_log_linecount; |
187 | int enable_remote_branches; | 187 | int enable_remote_branches; |
188 | int enable_subject_links; | 188 | int enable_subject_links; |
189 | int enable_tree_linenumbers; | 189 | int enable_tree_linenumbers; |
190 | int local_time; | 190 | int local_time; |
191 | int max_atom_items; | 191 | int max_atom_items; |
192 | int max_repo_count; | 192 | int max_repo_count; |
193 | int max_commit_count; | 193 | int max_commit_count; |
194 | int max_lock_attempts; | 194 | int max_lock_attempts; |
195 | int max_msg_len; | 195 | int max_msg_len; |
196 | int max_repodesc_len; | 196 | int max_repodesc_len; |
197 | int max_blob_size; | 197 | int max_blob_size; |
198 | int max_stats; | 198 | int max_stats; |
199 | int nocache; | 199 | int nocache; |
200 | int noplainemail; | 200 | int noplainemail; |
201 | int noheader; | 201 | int noheader; |
202 | int renamelimit; | 202 | int renamelimit; |
203 | int snapshots; | 203 | int snapshots; |
204 | int summary_branches; | 204 | int summary_branches; |
205 | int summary_log; | 205 | int summary_log; |
206 | int summary_tags; | 206 | int summary_tags; |
207 | int ssdiff; | 207 | int ssdiff; |
208 | struct string_list mimetypes; | 208 | struct string_list mimetypes; |
209 | struct cgit_filter *about_filter; | 209 | struct cgit_filter *about_filter; |
210 | struct cgit_filter *commit_filter; | 210 | struct cgit_filter *commit_filter; |
211 | struct cgit_filter *source_filter; | 211 | struct cgit_filter *source_filter; |
212 | }; | 212 | }; |
213 | 213 | ||
214 | struct cgit_page { | 214 | struct cgit_page { |
215 | time_t modified; | 215 | time_t modified; |
216 | time_t expires; | 216 | time_t expires; |
217 | size_t size; | 217 | size_t size; |
218 | char *mimetype; | 218 | char *mimetype; |
219 | char *charset; | 219 | char *charset; |
220 | char *filename; | 220 | char *filename; |
221 | char *etag; | 221 | char *etag; |
222 | char *title; | 222 | char *title; |
223 | int status; | 223 | int status; |
224 | char *statusmsg; | 224 | char *statusmsg; |
225 | }; | 225 | }; |
226 | 226 | ||
227 | struct cgit_environment { | 227 | struct cgit_environment { |
228 | char *cgit_config; | 228 | char *cgit_config; |
229 | char *http_host; | 229 | char *http_host; |
230 | char *https; | 230 | char *https; |
231 | char *no_http; | 231 | char *no_http; |
232 | char *path_info; | 232 | char *path_info; |
233 | char *query_string; | 233 | char *query_string; |
234 | char *request_method; | 234 | char *request_method; |
235 | char *script_name; | 235 | char *script_name; |
236 | char *server_name; | 236 | char *server_name; |
237 | char *server_port; | 237 | char *server_port; |
238 | }; | 238 | }; |
239 | 239 | ||
240 | struct cgit_context { | 240 | 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 */ |