diff options
author | Lars Hjemli <hjemli@gmail.com> | 2007-05-20 22:09:55 +0200 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-20 22:09:55 +0200 |
commit | dc3ac3f76077c5d612d42e8beb4878e43acfc58a (patch) | |
tree | dfb996c0ce9833841578e1f0accbb5a387c01237 /cgit.h | |
parent | Merge branch 'index-header' (diff) | |
parent | Don't be fooled by trailing '/' in url-parameter (diff) | |
download | cgit-pink-dc3ac3f76077c5d612d42e8beb4878e43acfc58a.tar.gz cgit-pink-dc3ac3f76077c5d612d42e8beb4878e43acfc58a.zip |
Merge branch 'virtual-url'
* virtual-url: Don't be fooled by trailing '/' in url-parameter cache_safe_filename() needs more buffers Enable url=value querystring parameter Add lookup-function for valid repo commands Move cgit_get_repoinfo into shared.c
Diffstat (limited to '')
-rw-r--r-- | cgit.h | 15 |
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 @@ #include <xdiff/xdiff.h> +/* + * The valid cgit repo-commands + */ +#define CMD_LOG 1 +#define CMD_COMMIT 2 +#define CMD_DIFF 3 +#define CMD_TREE 4 +#define CMD_VIEW 5 +#define CMD_BLOB 6 +#define CMD_SNAPSHOT 7 + typedef void (*configfn)(const char *name, const char *value); typedef void (*filepair_fn)(struct diff_filepair *pair); typedef void (*linediff_fn)(char *line, int len); @@ -71,6 +82,7 @@ extern const char cgit_version[]; extern struct repolist cgit_repolist; extern struct repoinfo *cgit_repo; +extern int cgit_cmd; extern char *cgit_root_title; extern char *cgit_css; @@ -113,6 +125,8 @@ extern int cgit_query_ofs; extern int htmlfd; +extern int cgit_get_cmd_index(const char *cmd); +extern struct repoinfo *cgit_get_repoinfo(const char *url); extern void cgit_global_config_cb(const char *name, const char *value); extern void cgit_repo_config_cb(const char *name, const char *value); extern void cgit_querystring_cb(const char *name, const char *value); @@ -151,6 +165,7 @@ extern int cgit_read_config(const char *filename, configfn fn); extern int cgit_parse_query(char *txt, configfn fn); extern struct commitinfo *cgit_parse_commit(struct commit *commit); extern struct taginfo *cgit_parse_tag(struct tag *tag); +extern void cgit_parse_url(const char *url); extern char *cache_safe_filename(const char *unsafe); extern int cache_lock(struct cacheitem *item); |