5 #include <openssl/sha.h>
9 typedef void (*configfn
)(const char *name
, const char *value
);
18 extern char *cgit_root
;
19 extern char *cgit_root_title
;
20 extern char *cgit_css
;
21 extern char *cgit_logo
;
22 extern char *cgit_logo_link
;
23 extern char *cgit_virtual_root
;
24 extern char *cgit_cache_root
;
26 extern int cgit_cache_root_ttl
;
27 extern int cgit_cache_repo_ttl
;
28 extern int cgit_cache_dynamic_ttl
;
29 extern int cgit_cache_static_ttl
;
30 extern int cgit_cache_max_create_time
;
32 extern char *cgit_repo_name
;
33 extern char *cgit_repo_desc
;
34 extern char *cgit_repo_owner
;
36 extern int cgit_query_has_symref
;
37 extern int cgit_query_has_sha1
;
39 extern char *cgit_querystring
;
40 extern char *cgit_query_repo
;
41 extern char *cgit_query_page
;
42 extern char *cgit_query_head
;
43 extern char *cgit_query_sha1
;
47 extern char *fmt(const char *format
,...);
49 extern void html(const char *txt
);
50 extern void htmlf(const char *format
,...);
51 extern void html_txt(char *txt
);
52 extern void html_attr(char *txt
);
53 extern void html_link_open(char *url
, char *title
, char *class);
54 extern void html_link_close(void);
57 extern int cgit_read_config(const char *filename
, configfn fn
);
59 extern int cache_lookup(struct cacheitem
*item
);
60 extern int cache_lock(struct cacheitem
*item
);
61 extern int cache_unlock(struct cacheitem
*item
);
62 extern int cache_expired(struct cacheitem
*item
);