nsxivf7145db
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.
+0 −16
2 files changed
| @@ -55,11 +55,6 @@ | |||
| 55 | 55 | (tv)->tv_usec += (t) % 1000 * 1000; \ | |
| 56 | 56 | } | |
| 57 | 57 | ||
| 58 | − | typedef enum { | |
| 59 | − | BO_BIG_ENDIAN, | |
| 60 | − | BO_LITTLE_ENDIAN | |
| 61 | − | } byteorder_t; | |
| 62 | − | ||
| 63 | 58 | typedef enum { | |
| 64 | 59 | MODE_ALL, | |
| 65 | 60 | MODE_IMAGE, | |
| @@ -352,7 +347,6 @@ void* emalloc(size_t); | |||
| 352 | 347 | void* erealloc(void*, size_t); | |
| 353 | 348 | char* estrdup(const char*); | |
| 354 | 349 | void error(int, int, const char*, ...); | |
| 355 | − | void size_readable(float*, const char**); | |
| 356 | 350 | int r_opendir(r_dir_t*, const char*, bool); | |
| 357 | 351 | int r_closedir(r_dir_t*); | |
| 358 | 352 | char* r_readdir(r_dir_t*, bool); | |
| @@ -79,16 +79,6 @@ void error(int eval, int err, const char* fmt, ...) | |||
| 79 | 79 | exit(eval); | |
| 80 | 80 | } | |
| 81 | 81 | ||
| 82 | − | void size_readable(float *size, const char **unit) | |
| 83 | − | { | |
| 84 | − | const char *units[] = { "", "K", "M", "G" }; | |
| 85 | − | unsigned int i; | |
| 86 | − | ||
| 87 | − | for (i = 0; i < ARRLEN(units) && *size > 1024.0; i++) | |
| 88 | − | *size /= 1024.0; | |
| 89 | − | *unit = units[MIN(i, ARRLEN(units) - 1)]; | |
| 90 | − | } | |
| 91 | − | ||
| 92 | 82 | int r_opendir(r_dir_t *rdir, const char *dirname, bool recursive) | |
| 93 | 83 | { | |
| 94 | 84 | if (*dirname == '\0') | |