aboutsummaryrefslogtreecommitdiffstats
path: root/ui-shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ui-shared.c b/ui-shared.c
index bca50aa..6f5cf2b 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -14,9 +14,9 @@ const char cgit_doctype[] =
14 14
15static char *http_date(time_t t) 15static char *http_date(time_t t)
16{ 16{
17 static char day[][4] = 17 static char day[][4] =
18 {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; 18 {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
19 static char month[][4] = 19 static char month[][4] =
20 {"Jan", "Feb", "Mar", "Apr", "May", "Jun", 20 {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
21 "Jul", "Aug", "Sep", "Oct", "Now", "Dec"}; 21 "Jul", "Aug", "Sep", "Oct", "Now", "Dec"};
22 struct tm *tm = gmtime(&t); 22 struct tm *tm = gmtime(&t);
@@ -57,11 +57,11 @@ char *cgit_repourl(const char *reponame)
57 } 57 }
58} 58}
59 59
60char *cgit_pageurl(const char *reponame, const char *pagename, 60char *cgit_pageurl(const char *reponame, const char *pagename,
61 const char *query) 61 const char *query)
62{ 62{
63 if (cgit_virtual_root) { 63 if (cgit_virtual_root) {
64 return fmt("%s/%s/%s/?%s", cgit_virtual_root, reponame, 64 return fmt("%s/%s/%s/?%s", cgit_virtual_root, reponame,
65 pagename, query); 65 pagename, query);
66 } else { 66 } else {
67 return fmt("?r=%s&p=%s&%s", reponame, pagename, query); 67 return fmt("?r=%s&p=%s&%s", reponame, pagename, query);
@@ -89,7 +89,6 @@ void cgit_print_date(unsigned long secs)
89 time = gmtime(&secs); 89 time = gmtime(&secs);
90 strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", time); 90 strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", time);
91 html_txt(buf); 91 html_txt(buf);
92
93} 92}
94 93
95void cgit_print_docstart(char *title, struct cacheitem *item) 94void cgit_print_docstart(char *title, struct cacheitem *item)
@@ -162,7 +161,7 @@ void cgit_print_pageheader(char *title, int show_search)
162 html("<tr><td id='content' colspan='2'>"); 161 html("<tr><td id='content' colspan='2'>");
163} 162}
164 163
165void cgit_print_snapshot_start(const char *mimetype, const char *filename, 164void cgit_print_snapshot_start(const char *mimetype, const char *filename,
166 struct cacheitem *item) 165 struct cacheitem *item)
167{ 166{
168 htmlf("Content-Type: %s\n", mimetype); 167 htmlf("Content-Type: %s\n", mimetype);