summaryrefslogtreecommitdiffabout
path: root/cgit.h
Unidiff
Diffstat (limited to 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cgit.h b/cgit.h
index 1e084d4..3b0994a 100644
--- a/cgit.h
+++ b/cgit.h
@@ -1,64 +1,65 @@
1#ifndef CGIT_H 1#ifndef CGIT_H
2#define CGIT_H 2#define CGIT_H
3 3
4#include "git.h" 4#include "git.h"
5#include <openssl/sha.h> 5#include <openssl/sha.h>
6#include <ctype.h> 6#include <ctype.h>
7#include <sched.h> 7#include <sched.h>
8 8
9typedef void (*configfn)(const char *name, const char *value); 9typedef void (*configfn)(const char *name, const char *value);
10 10
11struct cacheitem { 11struct cacheitem {
12 char *name; 12 char *name;
13 struct stat st; 13 struct stat st;
14 int ttl; 14 int ttl;
15 int fd; 15 int fd;
16}; 16};
17 17
18extern char *cgit_root; 18extern char *cgit_root;
19extern char *cgit_root_title; 19extern char *cgit_root_title;
20extern char *cgit_css; 20extern char *cgit_css;
21extern char *cgit_logo; 21extern char *cgit_logo;
22extern char *cgit_logo_link; 22extern char *cgit_logo_link;
23extern char *cgit_virtual_root; 23extern char *cgit_virtual_root;
24extern char *cgit_cache_root; 24extern char *cgit_cache_root;
25 25
26extern int cgit_cache_root_ttl; 26extern int cgit_cache_root_ttl;
27extern int cgit_cache_repo_ttl; 27extern int cgit_cache_repo_ttl;
28extern int cgit_cache_dynamic_ttl; 28extern int cgit_cache_dynamic_ttl;
29extern int cgit_cache_static_ttl; 29extern int cgit_cache_static_ttl;
30extern int cgit_cache_max_create_time; 30extern int cgit_cache_max_create_time;
31 31
32extern char *cgit_repo_name; 32extern char *cgit_repo_name;
33extern char *cgit_repo_desc; 33extern char *cgit_repo_desc;
34extern char *cgit_repo_owner; 34extern char *cgit_repo_owner;
35 35
36extern int cgit_query_has_symref; 36extern int cgit_query_has_symref;
37extern int cgit_query_has_sha1; 37extern int cgit_query_has_sha1;
38 38
39extern char *cgit_querystring; 39extern char *cgit_querystring;
40extern char *cgit_query_repo; 40extern char *cgit_query_repo;
41extern char *cgit_query_page; 41extern char *cgit_query_page;
42extern char *cgit_query_head; 42extern char *cgit_query_head;
43extern char *cgit_query_sha1; 43extern char *cgit_query_sha1;
44 44
45extern int htmlfd; 45extern int htmlfd;
46 46
47extern char *fmt(const char *format,...); 47extern char *fmt(const char *format,...);
48 48
49extern void html(const char *txt); 49extern void html(const char *txt);
50extern void htmlf(const char *format,...); 50extern void htmlf(const char *format,...);
51extern void html_txt(char *txt); 51extern void html_txt(char *txt);
52extern void html_attr(char *txt); 52extern void html_attr(char *txt);
53extern void html_link_open(char *url, char *title, char *class); 53extern void html_link_open(char *url, char *title, char *class);
54extern void html_link_close(void); 54extern void html_link_close(void);
55 55
56 56
57extern int cgit_read_config(const char *filename, configfn fn); 57extern int cgit_read_config(const char *filename, configfn fn);
58 58
59extern int cache_lookup(struct cacheitem *item); 59extern void cache_prepare(struct cacheitem *item);
60extern int cache_lock(struct cacheitem *item); 60extern int cache_lock(struct cacheitem *item);
61extern int cache_unlock(struct cacheitem *item); 61extern int cache_unlock(struct cacheitem *item);
62extern int cache_exist(struct cacheitem *item);
62extern int cache_expired(struct cacheitem *item); 63extern int cache_expired(struct cacheitem *item);
63 64
64#endif /* CGIT_H */ 65#endif /* CGIT_H */