diff options
author | Lars Hjemli | 2008-02-16 11:53:40 +0100 |
---|---|---|
committer | Lars Hjemli | 2008-02-16 12:07:28 +0100 |
commit | d14d77fe95c3b6224b40df9b101dded0deea913c (patch) | |
tree | 7e0d9c8f2c0f86b8946aea0bb823085c33b164b3 /cgit.h | |
parent | e5ed227ef0da561e2bde8646ec816842392377ee (diff) | |
download | cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.tar.gz cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.tar.bz2 cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.zip |
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.h | 35 |
1 files changed, 21 insertions, 14 deletions
@@ -123,10 +123,31 @@ struct reflist { | |||
123 | int count; | 123 | int count; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | struct cgit_query { | ||
127 | int has_symref; | ||
128 | int has_sha1; | ||
129 | char *raw; | ||
130 | char *repo; | ||
131 | char *page; | ||
132 | char *search; | ||
133 | char *grep; | ||
134 | char *head; | ||
135 | char *sha1; | ||
136 | char *sha2; | ||
137 | char *path; | ||
138 | char *name; | ||
139 | int ofs; | ||
140 | }; | ||
141 | |||
142 | struct cgit_context { | ||
143 | struct cgit_query qry; | ||
144 | }; | ||
145 | |||
126 | extern const char *cgit_version; | 146 | extern const char *cgit_version; |
127 | 147 | ||
128 | extern struct repolist cgit_repolist; | 148 | extern struct repolist cgit_repolist; |
129 | extern struct repoinfo *cgit_repo; | 149 | extern struct repoinfo *cgit_repo; |
150 | extern struct cgit_context ctx; | ||
130 | extern int cgit_cmd; | 151 | extern int cgit_cmd; |
131 | 152 | ||
132 | extern char *cgit_root_title; | 153 | extern char *cgit_root_title; |
@@ -163,20 +184,6 @@ extern int cgit_max_msg_len; | |||
163 | extern int cgit_max_repodesc_len; | 184 | extern int cgit_max_repodesc_len; |
164 | extern int cgit_max_commit_count; | 185 | extern int cgit_max_commit_count; |
165 | 186 | ||
166 | extern int cgit_query_has_symref; | ||
167 | extern int cgit_query_has_sha1; | ||
168 | |||
169 | extern char *cgit_querystring; | ||
170 | extern char *cgit_query_repo; | ||
171 | extern char *cgit_query_page; | ||
172 | extern char *cgit_query_search; | ||
173 | extern char *cgit_query_grep; | ||
174 | extern char *cgit_query_head; | ||
175 | extern char *cgit_query_sha1; | ||
176 | extern char *cgit_query_sha2; | ||
177 | extern char *cgit_query_path; | ||
178 | extern char *cgit_query_name; | ||
179 | extern int cgit_query_ofs; | ||
180 | 187 | ||
181 | extern int htmlfd; | 188 | extern int htmlfd; |
182 | 189 | ||