summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Unidiff
Diffstat (limited to 'ui-shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index ca2ee82..5c5bcf3 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -214,32 +214,38 @@ void cgit_log_link(char *name, char *title, char *class, char *head,
214 html_txt(name); 214 html_txt(name);
215 html("</a>"); 215 html("</a>");
216} 216}
217 217
218void cgit_commit_link(char *name, char *title, char *class, char *head, 218void cgit_commit_link(char *name, char *title, char *class, char *head,
219 char *rev) 219 char *rev)
220{ 220{
221 if (strlen(name) > cgit_max_msg_len && cgit_max_msg_len >= 15) { 221 if (strlen(name) > cgit_max_msg_len && cgit_max_msg_len >= 15) {
222 name[cgit_max_msg_len] = '\0'; 222 name[cgit_max_msg_len] = '\0';
223 name[cgit_max_msg_len - 1] = '.'; 223 name[cgit_max_msg_len - 1] = '.';
224 name[cgit_max_msg_len - 2] = '.'; 224 name[cgit_max_msg_len - 2] = '.';
225 name[cgit_max_msg_len - 3] = '.'; 225 name[cgit_max_msg_len - 3] = '.';
226 } 226 }
227 reporevlink("commit", name, title, class, head, rev, NULL); 227 reporevlink("commit", name, title, class, head, rev, NULL);
228} 228}
229 229
230void cgit_snapshot_link(char *name, char *title, char *class, char *head,
231 char *rev, char *archivename)
232{
233 reporevlink("snapshot", name, title, class, head, rev, archivename);
234}
235
230void cgit_diff_link(char *name, char *title, char *class, char *head, 236void cgit_diff_link(char *name, char *title, char *class, char *head,
231 char *new_rev, char *old_rev, char *path) 237 char *new_rev, char *old_rev, char *path)
232{ 238{
233 char *delim; 239 char *delim;
234 240
235 delim = repolink(title, class, "diff", head, path); 241 delim = repolink(title, class, "diff", head, path);
236 if (new_rev && strcmp(new_rev, cgit_query_head)) { 242 if (new_rev && strcmp(new_rev, cgit_query_head)) {
237 html(delim); 243 html(delim);
238 html("id="); 244 html("id=");
239 html_attr(new_rev); 245 html_attr(new_rev);
240 delim = "&amp;"; 246 delim = "&amp;";
241 } 247 }
242 if (old_rev) { 248 if (old_rev) {
243 html(delim); 249 html(delim);
244 html("id2="); 250 html("id2=");
245 html_attr(old_rev); 251 html_attr(old_rev);