summaryrefslogtreecommitdiffabout
path: root/cgit.c
authorLars Hjemli <hjemli@gmail.com>2008-04-08 19:11:36 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2008-04-08 19:11:36 (UTC)
commite87e89633383b8b75c68c98be3e0c14212109de2 (patch) (side-by-side diff)
treef57e131ab854b58023387aee8efc0e4ee54653b5 /cgit.c
parent20a33548b9a87a6eb23162ee5d137daa46d78613 (diff)
downloadcgit-e87e89633383b8b75c68c98be3e0c14212109de2.zip
cgit-e87e89633383b8b75c68c98be3e0c14212109de2.tar.gz
cgit-e87e89633383b8b75c68c98be3e0c14212109de2.tar.bz2
Move cgit_parse_query() from parsing.c to html.c as http_parse_querystring()
This is a generic http-function. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index 1f46e0d..763242a 100644
--- a/cgit.c
+++ b/cgit.c
@@ -1,24 +1,25 @@
/* cgit.c: cgi for the git scm
*
* Copyright (C) 2006 Lars Hjemli
*
* Licensed under GNU General Public License v2
* (see COPYING for full license text)
*/
#include "cgit.h"
#include "cache.h"
#include "cmd.h"
#include "configfile.h"
+#include "html.h"
#include "ui-shared.h"
const char *cgit_version = CGIT_VERSION;
void config_cb(const char *name, const char *value)
{
if (!strcmp(name, "root-title"))
ctx.cfg.root_title = xstrdup(value);
else if (!strcmp(name, "css"))
ctx.cfg.css = xstrdup(value);
else if (!strcmp(name, "logo"))
ctx.cfg.logo = xstrdup(value);
@@ -435,23 +436,23 @@ int main(int argc, const char **argv)
item.st.st_mtime = time(NULL);
cgit_repolist.length = 0;
cgit_repolist.count = 0;
cgit_repolist.repos = NULL;
parse_configfile(cgit_config_env ? cgit_config_env : CGIT_CONFIG,
config_cb);
if (getenv("SCRIPT_NAME"))
ctx.cfg.script_name = xstrdup(getenv("SCRIPT_NAME"));
if (getenv("QUERY_STRING"))
ctx.qry.raw = xstrdup(getenv("QUERY_STRING"));
cgit_parse_args(argc, argv);
- cgit_parse_query(ctx.qry.raw, querystring_cb);
+ http_parse_querystring(ctx.qry.raw, querystring_cb);
if (!cgit_prepare_cache(&item))
return 0;
if (ctx.cfg.nocache) {
cgit_fill_cache(&item, 0);
} else {
cgit_check_cache(&item);
cgit_print_cache(&item);
}
return 0;
}