author | Lars Hjemli <hjemli@gmail.com> | 2009-08-11 08:12:53 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-08-11 08:12:53 (UTC) |
commit | 2c742d1a925486a47f74710325b3076a7742a9f9 (patch) (unidiff) | |
tree | e16e8de4c65cb659a5b487ac3f8a7d7254fef395 /cgit.h | |
parent | fcc6056230e367e276dcb5a292d45e272cc6e7e6 (diff) | |
parent | 80550bbe028b551550395653d32a0ba50db540ef (diff) | |
download | cgit-2c742d1a925486a47f74710325b3076a7742a9f9.zip cgit-2c742d1a925486a47f74710325b3076a7742a9f9.tar.gz cgit-2c742d1a925486a47f74710325b3076a7742a9f9.tar.bz2 |
Merge branch 'lh/embedded'
-rw-r--r-- | cgit.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -178,65 +178,79 @@ struct cgit_config { | |||
178 | int max_commit_count; | 178 | int max_commit_count; |
179 | int max_lock_attempts; | 179 | int max_lock_attempts; |
180 | int max_msg_len; | 180 | int max_msg_len; |
181 | int max_repodesc_len; | 181 | int max_repodesc_len; |
182 | int max_stats; | 182 | int max_stats; |
183 | int nocache; | 183 | int nocache; |
184 | int noplainemail; | 184 | int noplainemail; |
185 | int noheader; | 185 | int noheader; |
186 | int renamelimit; | 186 | int renamelimit; |
187 | int snapshots; | 187 | int snapshots; |
188 | int summary_branches; | 188 | int summary_branches; |
189 | int summary_log; | 189 | int summary_log; |
190 | int summary_tags; | 190 | int summary_tags; |
191 | struct string_list mimetypes; | 191 | struct string_list mimetypes; |
192 | struct cgit_filter *about_filter; | 192 | struct cgit_filter *about_filter; |
193 | struct cgit_filter *commit_filter; | 193 | struct cgit_filter *commit_filter; |
194 | struct cgit_filter *source_filter; | 194 | struct cgit_filter *source_filter; |
195 | }; | 195 | }; |
196 | 196 | ||
197 | struct cgit_page { | 197 | struct cgit_page { |
198 | time_t modified; | 198 | time_t modified; |
199 | time_t expires; | 199 | time_t expires; |
200 | size_t size; | 200 | size_t size; |
201 | char *mimetype; | 201 | char *mimetype; |
202 | char *charset; | 202 | char *charset; |
203 | char *filename; | 203 | char *filename; |
204 | char *etag; | 204 | char *etag; |
205 | char *title; | 205 | char *title; |
206 | int status; | 206 | int status; |
207 | char *statusmsg; | 207 | char *statusmsg; |
208 | }; | 208 | }; |
209 | 209 | ||
210 | struct cgit_environment { | ||
211 | char *cgit_config; | ||
212 | char *http_host; | ||
213 | char *https; | ||
214 | char *no_http; | ||
215 | char *path_info; | ||
216 | char *query_string; | ||
217 | char *request_method; | ||
218 | char *script_name; | ||
219 | char *server_name; | ||
220 | char *server_port; | ||
221 | }; | ||
222 | |||
210 | struct cgit_context { | 223 | struct cgit_context { |
224 | struct cgit_environment env; | ||
211 | struct cgit_query qry; | 225 | struct cgit_query qry; |
212 | struct cgit_config cfg; | 226 | struct cgit_config cfg; |
213 | struct cgit_repo *repo; | 227 | struct cgit_repo *repo; |
214 | struct cgit_page page; | 228 | struct cgit_page page; |
215 | }; | 229 | }; |
216 | 230 | ||
217 | struct cgit_snapshot_format { | 231 | struct cgit_snapshot_format { |
218 | const char *suffix; | 232 | const char *suffix; |
219 | const char *mimetype; | 233 | const char *mimetype; |
220 | write_archive_fn_t write_func; | 234 | write_archive_fn_t write_func; |
221 | int bit; | 235 | int bit; |
222 | }; | 236 | }; |
223 | 237 | ||
224 | extern const char *cgit_version; | 238 | extern const char *cgit_version; |
225 | 239 | ||
226 | extern struct cgit_repolist cgit_repolist; | 240 | extern struct cgit_repolist cgit_repolist; |
227 | extern struct cgit_context ctx; | 241 | extern struct cgit_context ctx; |
228 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; | 242 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; |
229 | 243 | ||
230 | extern struct cgit_repo *cgit_add_repo(const char *url); | 244 | extern struct cgit_repo *cgit_add_repo(const char *url); |
231 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); | 245 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
232 | extern void cgit_repo_config_cb(const char *name, const char *value); | 246 | extern void cgit_repo_config_cb(const char *name, const char *value); |
233 | 247 | ||
234 | extern int chk_zero(int result, char *msg); | 248 | extern int chk_zero(int result, char *msg); |
235 | extern int chk_positive(int result, char *msg); | 249 | extern int chk_positive(int result, char *msg); |
236 | extern int chk_non_negative(int result, char *msg); | 250 | extern int chk_non_negative(int result, char *msg); |
237 | 251 | ||
238 | extern char *trim_end(const char *str, char c); | 252 | extern char *trim_end(const char *str, char c); |
239 | extern char *strlpart(char *txt, int maxlen); | 253 | extern char *strlpart(char *txt, int maxlen); |
240 | extern char *strrpart(char *txt, int maxlen); | 254 | extern char *strrpart(char *txt, int maxlen); |
241 | 255 | ||
242 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); | 256 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); |