aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.h
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2008-02-16 11:53:40 +0100
committerLars Hjemli <hjemli@gmail.com>2008-02-16 12:07:28 +0100
commitd14d77fe95c3b6224b40df9b101dded0deea913c (patch)
tree7e0d9c8f2c0f86b8946aea0bb823085c33b164b3 /cgit.h
parente5ed227ef0da561e2bde8646ec816842392377ee (diff)
Introduce struct cgit_context
This struct will hold all the cgit runtime information currently found in a multitude of global variables. The first cleanup removes all querystring-related variables. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h')
-rw-r--r--cgit.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/cgit.h b/cgit.h
index 66c40b9..4576efb 100644
--- a/cgit.h
+++ b/cgit.h
@@ -123,10 +123,31 @@ struct reflist {
int count;
};
+struct cgit_query {
+ int has_symref;
+ int has_sha1;
+ char *raw;
+ char *repo;
+ char *page;
+ char *search;
+ char *grep;
+ char *head;
+ char *sha1;
+ char *sha2;
+ char *path;
+ char *name;
+ int ofs;
+};
+
+struct cgit_context {
+ struct cgit_query qry;
+};
+
extern const char *cgit_version;
extern struct repolist cgit_repolist;
extern struct repoinfo *cgit_repo;
+extern struct cgit_context ctx;
extern int cgit_cmd;
extern char *cgit_root_title;
@@ -163,20 +184,6 @@ extern int cgit_max_msg_len;
extern int cgit_max_repodesc_len;
extern int cgit_max_commit_count;
-extern int cgit_query_has_symref;
-extern int cgit_query_has_sha1;
-
-extern char *cgit_querystring;
-extern char *cgit_query_repo;
-extern char *cgit_query_page;
-extern char *cgit_query_search;
-extern char *cgit_query_grep;
-extern char *cgit_query_head;
-extern char *cgit_query_sha1;
-extern char *cgit_query_sha2;
-extern char *cgit_query_path;
-extern char *cgit_query_name;
-extern int cgit_query_ofs;
extern int htmlfd;