aboutsummaryrefslogtreecommitdiffstats
path: root/ui-shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index cc1ab8b..2eff79d 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -7,6 +7,7 @@
7 */ 7 */
8 8
9#include "cgit.h" 9#include "cgit.h"
10#include "html.h"
10 11
11const char cgit_doctype[] = 12const char cgit_doctype[] =
12"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n" 13"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n"
@@ -567,4 +568,19 @@ void cgit_print_snapshot_start(const char *mimetype, const char *filename,
567 html("\n"); 568 html("\n");
568} 569}
569 570
571void cgit_print_filemode(unsigned short mode)
572{
573 if (S_ISDIR(mode))
574 html("d");
575 else if (S_ISLNK(mode))
576 html("l");
577 else if (S_ISGITLINK(mode))
578 html("m");
579 else
580 html("-");
581 html_fileperm(mode >> 6);
582 html_fileperm(mode >> 3);
583 html_fileperm(mode);
584}
585
570/* vim:set sw=8: */ 586/* vim:set sw=8: */