From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Tue, 19 Jan 2016 19:33:08 +0000 Subject: [PATCH 8/8] ui-shared: remove cgit_print_date() In-Reply-To: References: Message-ID: <14b2318ad1fb5d9f1b3d9108df31787c14701251.1453231719.git.john@keeping.me.uk> There are no longer any users of this function. Signed-off-by: John Keeping --- ui-shared.c | 20 -------------------- ui-shared.h | 1 - 2 files changed, 21 deletions(-) diff --git a/ui-shared.c b/ui-shared.c index 9699524..286aa92 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -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; diff --git a/ui-shared.h b/ui-shared.h index ed351c2..5a39947 100644 --- a/ui-shared.h +++ b/ui-shared.h @@ -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); -- 2.7.0.226.gfe986fe