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 in691c6d7
, 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 inbad9a70
.
This commit is contained in:
parent
0f3766eaab
commit
f7145db7f8
6
nsxiv.h
6
nsxiv.h
@ -55,11 +55,6 @@
|
|||||||
(tv)->tv_usec += (t) % 1000 * 1000; \
|
(tv)->tv_usec += (t) % 1000 * 1000; \
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
BO_BIG_ENDIAN,
|
|
||||||
BO_LITTLE_ENDIAN
|
|
||||||
} byteorder_t;
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MODE_ALL,
|
MODE_ALL,
|
||||||
MODE_IMAGE,
|
MODE_IMAGE,
|
||||||
@ -352,7 +347,6 @@ void* emalloc(size_t);
|
|||||||
void* erealloc(void*, size_t);
|
void* erealloc(void*, size_t);
|
||||||
char* estrdup(const char*);
|
char* estrdup(const char*);
|
||||||
void error(int, int, const char*, ...);
|
void error(int, int, const char*, ...);
|
||||||
void size_readable(float*, const char**);
|
|
||||||
int r_opendir(r_dir_t*, const char*, bool);
|
int r_opendir(r_dir_t*, const char*, bool);
|
||||||
int r_closedir(r_dir_t*);
|
int r_closedir(r_dir_t*);
|
||||||
char* r_readdir(r_dir_t*, bool);
|
char* r_readdir(r_dir_t*, bool);
|
||||||
|
10
util.c
10
util.c
@ -79,16 +79,6 @@ void error(int eval, int err, const char* fmt, ...)
|
|||||||
exit(eval);
|
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)
|
int r_opendir(r_dir_t *rdir, const char *dirname, bool recursive)
|
||||||
{
|
{
|
||||||
if (*dirname == '\0')
|
if (*dirname == '\0')
|
||||||
|
Loading…
Reference in New Issue
Block a user