summaryrefslogtreecommitdiff
path: root/cgit.h
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2008-02-16 13:56:09 +0100
committerLars Hjemli <hjemli@gmail.com>2008-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 {
int fd;
};
-struct repoinfo {
+struct cgit_repo {
char *url;
char *name;
char *path;
@@ -82,10 +82,10 @@ struct repoinfo {
int enable_log_linecount;
};
-struct repolist {
+struct cgit_repolist {
int length;
int count;
- struct repoinfo *repos;
+ struct cgit_repo *repos;
};
struct commitinfo {
@@ -177,12 +177,12 @@ struct cgit_config {
struct cgit_context {
struct cgit_query qry;
struct cgit_config cfg;
+ struct cgit_repo *repo;
};
extern const char *cgit_version;
-extern struct repolist cgit_repolist;
-extern struct repoinfo *cgit_repo;
+extern struct cgit_repolist cgit_repolist;
extern struct cgit_context ctx;
extern int cgit_cmd;
@@ -190,7 +190,7 @@ extern int htmlfd;
extern void cgit_prepare_context(struct cgit_context *ctx);
extern int cgit_get_cmd_index(const char *cmd);
-extern struct repoinfo *cgit_get_repoinfo(const char *url);
+extern struct cgit_repo *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);