aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.h
diff options
context:
space:
mode:
authorLars Hjemli2008-02-16 13:56:09 +0100
committerLars Hjemli2008-02-16 13:56:09 +0100
commitd1f3bbe9d22029f45a77bb938c176ccc0c827d46 (patch)
tree3f1741c012763cbc5485f31377abdd9241fbac6b /cgit.h
parentb228d4ff82a65fdcd4a7364759fe36a0bdda5978 (diff)
downloadcgit-d1f3bbe9d22029f45a77bb938c176ccc0c827d46.tar.gz
cgit-d1f3bbe9d22029f45a77bb938c176ccc0c827d46.tar.bz2
cgit-d1f3bbe9d22029f45a77bb938c176ccc0c827d46.zip
Move cgit_repo into cgit_context
This removes the global variable which is used to keep track of the currently selected repository, and adds a new variable in the cgit_context structure. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h')
-rw-r--r--cgit.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/cgit.h b/cgit.h
index 0338ebd..598d8c3 100644
--- a/cgit.h
+++ b/cgit.h
@@ -66,7 +66,7 @@ struct cacheitem {
66 int fd; 66 int fd;
67}; 67};
68 68
69struct repoinfo { 69struct cgit_repo {
70 char *url; 70 char *url;
71 char *name; 71 char *name;
72 char *path; 72 char *path;
@@ -82,10 +82,10 @@ struct repoinfo {
82 int enable_log_linecount; 82 int enable_log_linecount;
83}; 83};
84 84
85struct repolist { 85struct cgit_repolist {
86 int length; 86 int length;
87 int count; 87 int count;
88 struct repoinfo *repos; 88 struct cgit_repo *repos;
89}; 89};
90 90
91struct commitinfo { 91struct commitinfo {
@@ -177,12 +177,12 @@ struct cgit_config {
177struct cgit_context { 177struct cgit_context {
178 struct cgit_query qry; 178 struct cgit_query qry;
179 struct cgit_config cfg; 179 struct cgit_config cfg;
180 struct cgit_repo *repo;
180}; 181};
181 182
182extern const char *cgit_version; 183extern const char *cgit_version;
183 184
184extern struct repolist cgit_repolist; 185extern struct cgit_repolist cgit_repolist;
185extern struct repoinfo *cgit_repo;
186extern struct cgit_context ctx; 186extern struct cgit_context ctx;
187extern int cgit_cmd; 187extern int cgit_cmd;
188 188
@@ -190,7 +190,7 @@ extern int htmlfd;
190 190
191extern void cgit_prepare_context(struct cgit_context *ctx); 191extern void cgit_prepare_context(struct cgit_context *ctx);
192extern int cgit_get_cmd_index(const char *cmd); 192extern int cgit_get_cmd_index(const char *cmd);
193extern struct repoinfo *cgit_get_repoinfo(const char *url); 193extern struct cgit_repo *cgit_get_repoinfo(const char *url);
194extern void cgit_global_config_cb(const char *name, const char *value); 194extern void cgit_global_config_cb(const char *name, const char *value);
195extern void cgit_repo_config_cb(const char *name, const char *value); 195extern void cgit_repo_config_cb(const char *name, const char *value);
196extern void cgit_querystring_cb(const char *name, const char *value); 196extern void cgit_querystring_cb(const char *name, const char *value);