summaryrefslogtreecommitdiff
path: root/parsing.c
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 /parsing.c
parente5ed227ef0da561e2bde8646ec816842392377ee (diff)
downloadcgit-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 '')
-rw-r--r--parsing.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/parsing.c b/parsing.c
index 5093b8b..8cf56a4 100644
--- a/parsing.c
+++ b/parsing.c
@@ -149,7 +149,7 @@ void cgit_parse_url(const char *url)
cgit_repo = cgit_get_repoinfo(url);
if (cgit_repo) {
- cgit_query_repo = cgit_repo->url;
+ ctx.qry.repo = cgit_repo->url;
return;
}
@@ -163,15 +163,15 @@ void cgit_parse_url(const char *url)
continue;
}
- cgit_query_repo = cgit_repo->url;
+ ctx.qry.repo = cgit_repo->url;
p = strchr(cmd + 1, '/');
if (p) {
p[0] = '\0';
if (p[1])
- cgit_query_path = trim_end(p + 1, '/');
+ ctx.qry.path = trim_end(p + 1, '/');
}
cgit_cmd = cgit_get_cmd_index(cmd + 1);
- cgit_query_page = xstrdup(cmd + 1);
+ ctx.qry.page = xstrdup(cmd + 1);
return;
}
}