-rw-r--r-- | ui-shared.c | 17 |
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 | |||
@@ -574,3 +574,18 @@ void cgit_print_filemode(unsigned short mode) | |||
574 | } | 574 | } |
575 | 575 | ||
576 | /* vim:set sw=8: */ | 576 | void 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 | } | ||