diff options
-rw-r--r-- | cgit.c | 14 | ||||
-rw-r--r-- | cgit.h | 1 | ||||
-rw-r--r-- | shared.c | 13 |
3 files changed, 14 insertions, 14 deletions
@@ -11,20 +11,6 @@ | |||
11 | const char cgit_version[] = CGIT_VERSION; | 11 | const char cgit_version[] = CGIT_VERSION; |
12 | 12 | ||
13 | 13 | ||
14 | static struct repoinfo *cgit_get_repoinfo(char *url) | ||
15 | { | ||
16 | int i; | ||
17 | struct repoinfo *repo; | ||
18 | |||
19 | for (i=0; i<cgit_repolist.count; i++) { | ||
20 | repo = &cgit_repolist.repos[i]; | ||
21 | if (!strcmp(repo->url, url)) | ||
22 | return repo; | ||
23 | } | ||
24 | return NULL; | ||
25 | } | ||
26 | |||
27 | |||
28 | static int cgit_prepare_cache(struct cacheitem *item) | 14 | static int cgit_prepare_cache(struct cacheitem *item) |
29 | { | 15 | { |
30 | if (!cgit_query_repo) { | 16 | if (!cgit_query_repo) { |
@@ -112,6 +112,7 @@ extern int cgit_query_ofs; | |||
112 | 112 | ||
113 | extern int htmlfd; | 113 | extern int htmlfd; |
114 | 114 | ||
115 | extern struct repoinfo *cgit_get_repoinfo(const char *url); | ||
115 | extern void cgit_global_config_cb(const char *name, const char *value); | 116 | extern void cgit_global_config_cb(const char *name, const char *value); |
116 | extern void cgit_repo_config_cb(const char *name, const char *value); | 117 | extern void cgit_repo_config_cb(const char *name, const char *value); |
117 | extern void cgit_querystring_cb(const char *name, const char *value); | 118 | extern void cgit_querystring_cb(const char *name, const char *value); |
@@ -93,6 +93,19 @@ struct repoinfo *add_repo(const char *url) | |||
93 | return ret; | 93 | return ret; |
94 | } | 94 | } |
95 | 95 | ||
96 | struct repoinfo *cgit_get_repoinfo(const char *url) | ||
97 | { | ||
98 | int i; | ||
99 | struct repoinfo *repo; | ||
100 | |||
101 | for (i=0; i<cgit_repolist.count; i++) { | ||
102 | repo = &cgit_repolist.repos[i]; | ||
103 | if (!strcmp(repo->url, url)) | ||
104 | return repo; | ||
105 | } | ||
106 | return NULL; | ||
107 | } | ||
108 | |||
96 | void cgit_global_config_cb(const char *name, const char *value) | 109 | void cgit_global_config_cb(const char *name, const char *value) |
97 | { | 110 | { |
98 | if (!strcmp(name, "root-title")) | 111 | if (!strcmp(name, "root-title")) |