diff options
author | Lars Hjemli | 2008-03-24 01:09:39 +0100 |
---|---|---|
committer | Lars Hjemli | 2008-03-24 01:43:48 +0100 |
commit | e0e4478e7b4812f822d60a13a33525f8e529e1e8 (patch) | |
tree | 577c3927deb9b122f940b69ca7db66afe2422814 /cgit.h | |
parent | b608e88adb6f77328288afb6dd0eddf674fc9b5b (diff) | |
download | cgit-e0e4478e7b4812f822d60a13a33525f8e529e1e8.tar.gz cgit-e0e4478e7b4812f822d60a13a33525f8e529e1e8.tar.bz2 cgit-e0e4478e7b4812f822d60a13a33525f8e529e1e8.zip |
Add command dispatcher
This simplifies the code in cgit.c and makes it easier to extend cgit with
new pages/commands.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h')
-rw-r--r-- | cgit.h | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -20,19 +20,6 @@ | |||
20 | 20 | ||
21 | 21 | ||
22 | /* | 22 | /* |
23 | * The valid cgit repo-commands | ||
24 | */ | ||
25 | #define CMD_LOG 1 | ||
26 | #define CMD_COMMIT 2 | ||
27 | #define CMD_DIFF 3 | ||
28 | #define CMD_TREE 4 | ||
29 | #define CMD_BLOB 5 | ||
30 | #define CMD_SNAPSHOT 6 | ||
31 | #define CMD_TAG 7 | ||
32 | #define CMD_REFS 8 | ||
33 | #define CMD_PATCH 9 | ||
34 | |||
35 | /* | ||
36 | * Dateformats used on misc. pages | 23 | * Dateformats used on misc. pages |
37 | */ | 24 | */ |
38 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S" | 25 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S" |
@@ -197,7 +184,6 @@ extern struct cgit_context ctx; | |||
197 | extern int cgit_cmd; | 184 | extern int cgit_cmd; |
198 | 185 | ||
199 | extern void cgit_prepare_context(struct cgit_context *ctx); | 186 | extern void cgit_prepare_context(struct cgit_context *ctx); |
200 | extern int cgit_get_cmd_index(const char *cmd); | ||
201 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); | 187 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
202 | extern void cgit_global_config_cb(const char *name, const char *value); | 188 | extern void cgit_global_config_cb(const char *name, const char *value); |
203 | extern void cgit_repo_config_cb(const char *name, const char *value); | 189 | extern void cgit_repo_config_cb(const char *name, const char *value); |