aboutsummaryrefslogtreecommitdiffstats
path: root/nsxiv.h
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2022-05-31 13:25:14 +0200
committerGitea <gitea@fake.local>2022-06-28 21:28:06 +0200
commit6d5a04005dd1dff12ebfe2e3a56912ec26718f3f (patch)
tree56e39d86053cb3e6c72c7c3a0694b13780f434a6 /nsxiv.h
parent86a83c1ec5ba2a6e5130a373fca394a7002060c7 (diff)
downloadnsxiv-6d5a04005dd1dff12ebfe2e3a56912ec26718f3f.tar.zst
code-style: cleanup includes
* rm unused include <sys/types.h> * move <sys/time.h> to main.c, it's the only file that needs it. * move TV_* macros to main.c * let *.c files explicitly include what they need instead of including them at nsxiv.h
Diffstat (limited to 'nsxiv.h')
-rw-r--r--nsxiv.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/nsxiv.h b/nsxiv.h
index 38e1d7b..eb06328 100644
--- a/nsxiv.h
+++ b/nsxiv.h
@@ -20,11 +20,8 @@
#ifndef NSXIV_H
#define NSXIV_H
-#include <stdarg.h>
+#include <stddef.h>
#include <stdbool.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <sys/types.h>
#include <Imlib2.h>
#include <X11/Xlib.h>
@@ -39,17 +36,8 @@
#define ABS(a) ((a) > 0 ? (a) : -(a))
#define ARRLEN(a) (sizeof(a) / sizeof((a)[0]))
-
#define STREQ(s1,s2) (strcmp((s1), (s2)) == 0)
-#define TV_DIFF(t1,t2) (((t1)->tv_sec - (t2)->tv_sec ) * 1000 + \
- ((t1)->tv_usec - (t2)->tv_usec) / 1000)
-
-#define TV_ADD_MSEC(tv,t) { \
- (tv)->tv_sec += (t) / 1000; \
- (tv)->tv_usec += (t) % 1000 * 1000; \
-}
-
typedef enum {
MODE_ALL,
MODE_IMAGE,