diff options
Diffstat (limited to 'cgit.h')
-rw-r--r-- | cgit.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -18,6 +18,17 @@ | |||
18 | #include <xdiff/xdiff.h> | 18 | #include <xdiff/xdiff.h> |
19 | 19 | ||
20 | 20 | ||
21 | /* | ||
22 | * The valid cgit repo-commands | ||
23 | */ | ||
24 | #define CMD_LOG 1 | ||
25 | #define CMD_COMMIT 2 | ||
26 | #define CMD_DIFF 3 | ||
27 | #define CMD_TREE 4 | ||
28 | #define CMD_VIEW 5 | ||
29 | #define CMD_BLOB 6 | ||
30 | #define CMD_SNAPSHOT 7 | ||
31 | |||
21 | typedef void (*configfn)(const char *name, const char *value); | 32 | typedef void (*configfn)(const char *name, const char *value); |
22 | typedef void (*filepair_fn)(struct diff_filepair *pair); | 33 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
23 | typedef void (*linediff_fn)(char *line, int len); | 34 | typedef void (*linediff_fn)(char *line, int len); |
@@ -72,10 +83,12 @@ extern const char cgit_version[]; | |||
72 | 83 | ||
73 | extern struct repolist cgit_repolist; | 84 | extern struct repolist cgit_repolist; |
74 | extern struct repoinfo *cgit_repo; | 85 | extern struct repoinfo *cgit_repo; |
86 | extern int cgit_cmd; | ||
75 | 87 | ||
76 | extern char *cgit_root_title; | 88 | extern char *cgit_root_title; |
77 | extern char *cgit_css; | 89 | extern char *cgit_css; |
78 | extern char *cgit_logo; | 90 | extern char *cgit_logo; |
91 | extern char *cgit_index_header; | ||
79 | extern char *cgit_logo_link; | 92 | extern char *cgit_logo_link; |
80 | extern char *cgit_module_link; | 93 | extern char *cgit_module_link; |
81 | extern char *cgit_virtual_root; | 94 | extern char *cgit_virtual_root; |
@@ -114,6 +127,8 @@ extern int cgit_query_ofs; | |||
114 | 127 | ||
115 | extern int htmlfd; | 128 | extern int htmlfd; |
116 | 129 | ||
130 | extern int cgit_get_cmd_index(const char *cmd); | ||
131 | extern struct repoinfo *cgit_get_repoinfo(const char *url); | ||
117 | extern void cgit_global_config_cb(const char *name, const char *value); | 132 | extern void cgit_global_config_cb(const char *name, const char *value); |
118 | extern void cgit_repo_config_cb(const char *name, const char *value); | 133 | extern void cgit_repo_config_cb(const char *name, const char *value); |
119 | extern void cgit_querystring_cb(const char *name, const char *value); | 134 | extern void cgit_querystring_cb(const char *name, const char *value); |
@@ -146,11 +161,13 @@ extern void html_hidden(char *name, char *value); | |||
146 | extern void html_link_open(char *url, char *title, char *class); | 161 | extern void html_link_open(char *url, char *title, char *class); |
147 | extern void html_link_close(void); | 162 | extern void html_link_close(void); |
148 | extern void html_filemode(unsigned short mode); | 163 | extern void html_filemode(unsigned short mode); |
164 | extern int html_include(const char *filename); | ||
149 | 165 | ||
150 | extern int cgit_read_config(const char *filename, configfn fn); | 166 | extern int cgit_read_config(const char *filename, configfn fn); |
151 | extern int cgit_parse_query(char *txt, configfn fn); | 167 | extern int cgit_parse_query(char *txt, configfn fn); |
152 | extern struct commitinfo *cgit_parse_commit(struct commit *commit); | 168 | extern struct commitinfo *cgit_parse_commit(struct commit *commit); |
153 | extern struct taginfo *cgit_parse_tag(struct tag *tag); | 169 | extern struct taginfo *cgit_parse_tag(struct tag *tag); |
170 | extern void cgit_parse_url(const char *url); | ||
154 | 171 | ||
155 | extern char *cache_safe_filename(const char *unsafe); | 172 | extern char *cache_safe_filename(const char *unsafe); |
156 | extern int cache_lock(struct cacheitem *item); | 173 | extern int cache_lock(struct cacheitem *item); |