summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Unidiff
Diffstat (limited to 'ui-shared.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-shared.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 2596023..aa65988 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -564,13 +564,28 @@ void cgit_print_filemode(unsigned short mode)
564 html("d"); 564 html("d");
565 else if (S_ISLNK(mode)) 565 else if (S_ISLNK(mode))
566 html("l"); 566 html("l");
567 else if (S_ISGITLINK(mode)) 567 else if (S_ISGITLINK(mode))
568 html("m"); 568 html("m");
569 else 569 else
570 html("-"); 570 html("-");
571 html_fileperm(mode >> 6); 571 html_fileperm(mode >> 6);
572 html_fileperm(mode >> 3); 572 html_fileperm(mode >> 3);
573 html_fileperm(mode); 573 html_fileperm(mode);
574} 574}
575 575
576/* vim:set sw=8: */ 576void cgit_print_snapshot_links(const char *repo, const char *head,
577 const char *hex, int snapshots)
578{
579 const struct cgit_snapshot_format* f;
580 char *filename;
581
582 for (f = cgit_snapshot_formats; f->suffix; f++) {
583 if (!(snapshots & f->bit))
584 continue;
585 filename = fmt("%s-%s%s", cgit_repobasename(repo), hex,
586 f->suffix);
587 cgit_snapshot_link(filename, NULL, NULL, (char *)head,
588 (char *)hex, filename);
589 html("<br/>");
590 }
591}