]> gitweb.ps.run Git - ps-cgit/commitdiff
ui-shared: remove cgit_print_date()
authorJohn Keeping <john@keeping.me.uk>
Tue, 19 Jan 2016 19:33:08 +0000 (19:33 +0000)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 8 Feb 2016 13:23:16 +0000 (14:23 +0100)
There are no longer any users of this function.

Signed-off-by: John Keeping <john@keeping.me.uk>
ui-shared.c
ui-shared.h

index eaa45fb402f21aefcff21afe53e2bacae1ec0534..d1f92498507daf1904e32a3945a31f1882b2fdd2 100644 (file)
@@ -607,26 +607,6 @@ void cgit_submodule_link(const char *class, char *path, const char *rev)
                path[len - 1] = tail;
 }
 
-static const char *fmt_date(time_t secs, const char *format, int local_time)
-{
-       static char buf[64];
-       struct tm *time;
-
-       if (!secs)
-               return "";
-       if (local_time)
-               time = localtime(&secs);
-       else
-               time = gmtime(&secs);
-       strftime(buf, sizeof(buf)-1, format, time);
-       return buf;
-}
-
-void cgit_print_date(time_t secs, const char *format, int local_time)
-{
-       html_txt(fmt_date(secs, format, local_time));
-}
-
 const struct date_mode *cgit_date_mode(const char *format)
 {
        static struct date_mode mode;
index e42f13a4444921e98064bd1e320bafef81f4d034..43789dece553bd3ecf81b72e0d87eee7d27a82c3 100644 (file)
@@ -62,7 +62,6 @@ extern void cgit_print_error(const char *fmt, ...);
 __attribute__((format (printf,1,0)))
 extern void cgit_vprint_error(const char *fmt, va_list ap);
 extern const struct date_mode *cgit_date_mode(const char *format);
-extern void cgit_print_date(time_t secs, const char *format, int local_time);
 extern void cgit_print_age(time_t t, int tz, time_t max_relative);
 extern void cgit_print_http_headers(void);
 extern void cgit_redirect(const char *url, bool permanent);