aboutsummaryrefslogtreecommitdiffstats
path: root/ui-shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 71c899a..15d8254 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -176,6 +176,28 @@ void cgit_commit_link(char *name, char *title, char *class, char *head,
176 reporevlink("commit", name, title, class, head, rev, NULL); 176 reporevlink("commit", name, title, class, head, rev, NULL);
177} 177}
178 178
179void cgit_diff_link(char *name, char *title, char *class, char *head,
180 char *new_rev, char *old_rev, char *path)
181{
182 char *delim;
183
184 delim = repolink(title, class, "diff", head, path);
185 if (new_rev && strcmp(new_rev, cgit_query_head)) {
186 html(delim);
187 html("id=");
188 html_attr(new_rev);
189 delim = "&";
190 }
191 if (old_rev) {
192 html(delim);
193 html("id2=");
194 html_attr(old_rev);
195 }
196 html("'>");
197 html_txt(name);
198 html("</a>");
199}
200
179void cgit_print_date(time_t secs, char *format) 201void cgit_print_date(time_t secs, char *format)
180{ 202{
181 char buf[64]; 203 char buf[64];