From f7145db7f8a5d136a522e0045e5ff39b2279e04c Mon Sep 17 00:00:00 2001 From: N-R-K <79544946+N-R-K@users.noreply.github.com> Date: Mon, 3 Jan 2022 02:13:23 +0600 Subject: remove unused function and typedef (#199) byteorder_t and size_readable is not used anywhere within the code. byteorder_t seems to be a remain from some time sxiv handled exif data itself instead of relying on a library, introduced in 691c6d7, and probably became irrelevant when libexif was added as dependency again. And size_readable from some time it displayed the file size in the window title, introduced in bad9a70. --- util.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index 84297f0..47c5ceb 100644 --- a/util.c +++ b/util.c @@ -79,16 +79,6 @@ void error(int eval, int err, const char* fmt, ...) exit(eval); } -void size_readable(float *size, const char **unit) -{ - const char *units[] = { "", "K", "M", "G" }; - unsigned int i; - - for (i = 0; i < ARRLEN(units) && *size > 1024.0; i++) - *size /= 1024.0; - *unit = units[MIN(i, ARRLEN(units) - 1)]; -} - int r_opendir(r_dir_t *rdir, const char *dirname, bool recursive) { if (*dirname == '\0') -- cgit v1.2.3-70-g09d2