aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.h
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.h')
-rw-r--r--cgit.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index 3ee11bb..e0879bd 100644
--- a/cgit.h
+++ b/cgit.h
@@ -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
21typedef void (*configfn)(const char *name, const char *value); 32typedef void (*configfn)(const char *name, const char *value);
22typedef void (*filepair_fn)(struct diff_filepair *pair); 33typedef void (*filepair_fn)(struct diff_filepair *pair);
23typedef void (*linediff_fn)(char *line, int len); 34typedef void (*linediff_fn)(char *line, int len);
@@ -71,6 +82,7 @@ extern const char cgit_version[];
71 82
72extern struct repolist cgit_repolist; 83extern struct repolist cgit_repolist;
73extern struct repoinfo *cgit_repo; 84extern struct repoinfo *cgit_repo;
85extern int cgit_cmd;
74 86
75extern char *cgit_root_title; 87extern char *cgit_root_title;
76extern char *cgit_css; 88extern char *cgit_css;
@@ -113,6 +125,8 @@ extern int cgit_query_ofs;
113 125
114extern int htmlfd; 126extern int htmlfd;
115 127
128extern int cgit_get_cmd_index(const char *cmd);
129extern struct repoinfo *cgit_get_repoinfo(const char *url);
116extern void cgit_global_config_cb(const char *name, const char *value); 130extern void cgit_global_config_cb(const char *name, const char *value);
117extern void cgit_repo_config_cb(const char *name, const char *value); 131extern void cgit_repo_config_cb(const char *name, const char *value);
118extern void cgit_querystring_cb(const char *name, const char *value); 132extern void cgit_querystring_cb(const char *name, const char *value);
@@ -151,6 +165,7 @@ extern int cgit_read_config(const char *filename, configfn fn);
151extern int cgit_parse_query(char *txt, configfn fn); 165extern int cgit_parse_query(char *txt, configfn fn);
152extern struct commitinfo *cgit_parse_commit(struct commit *commit); 166extern struct commitinfo *cgit_parse_commit(struct commit *commit);
153extern struct taginfo *cgit_parse_tag(struct tag *tag); 167extern struct taginfo *cgit_parse_tag(struct tag *tag);
168extern void cgit_parse_url(const char *url);
154 169
155extern char *cache_safe_filename(const char *unsafe); 170extern char *cache_safe_filename(const char *unsafe);
156extern int cache_lock(struct cacheitem *item); 171extern int cache_lock(struct cacheitem *item);