author | Lars Hjemli <hjemli@gmail.com> | 2008-02-16 10:53:40 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-02-16 11:07:28 (UTC) |
commit | d14d77fe95c3b6224b40df9b101dded0deea913c (patch) (unidiff) | |
tree | 7e0d9c8f2c0f86b8946aea0bb823085c33b164b3 /ui-log.c | |
parent | e5ed227ef0da561e2bde8646ec816842392377ee (diff) | |
download | cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.zip cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.tar.gz cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.tar.bz2 |
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>
-rw-r--r-- | ui-log.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -39,3 +39,3 @@ void print_commit(struct commit *commit) | |||
39 | html("</td><td>"); | 39 | html("</td><td>"); |
40 | cgit_commit_link(info->subject, NULL, NULL, cgit_query_head, | 40 | cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, |
41 | sha1_to_hex(commit->object.sha1)); | 41 | sha1_to_hex(commit->object.sha1)); |
@@ -69,3 +69,3 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern | |||
69 | if (!tip) | 69 | if (!tip) |
70 | argv[1] = cgit_query_head; | 70 | argv[1] = ctx.qry.head; |
71 | 71 | ||
@@ -125,6 +125,6 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern | |||
125 | if (ofs > 0) { | 125 | if (ofs > 0) { |
126 | cgit_log_link("[prev]", NULL, NULL, cgit_query_head, | 126 | cgit_log_link("[prev]", NULL, NULL, ctx.qry.head, |
127 | cgit_query_sha1, cgit_query_path, | 127 | ctx.qry.sha1, ctx.qry.path, |
128 | ofs - cnt, cgit_query_grep, | 128 | ofs - cnt, ctx.qry.grep, |
129 | cgit_query_search); | 129 | ctx.qry.search); |
130 | html(" "); | 130 | html(" "); |
@@ -132,6 +132,6 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern | |||
132 | if ((commit = get_revision(&rev)) != NULL) { | 132 | if ((commit = get_revision(&rev)) != NULL) { |
133 | cgit_log_link("[next]", NULL, NULL, cgit_query_head, | 133 | cgit_log_link("[next]", NULL, NULL, ctx.qry.head, |
134 | cgit_query_sha1, cgit_query_path, | 134 | ctx.qry.sha1, ctx.qry.path, |
135 | ofs + cnt, cgit_query_grep, | 135 | ofs + cnt, ctx.qry.grep, |
136 | cgit_query_search); | 136 | ctx.qry.search); |
137 | } | 137 | } |