summaryrefslogtreecommitdiffstats
path: root/autoreload_nop.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2017-05-17 20:07:32 +0200
committerBert Münnich <ber.t@posteo.de>2017-05-17 20:07:32 +0200
commit3724d3fc17dc6135a05608cab5bdf00c6978282d (patch)
tree048434245e8c09070f09b7b7851394c95536ba7c /autoreload_nop.c
parentedb117e3bdb4d6bef4a4749d94144df8472c0a4d (diff)
downloadnsxiv-3724d3fc17dc6135a05608cab5bdf00c6978282d.tar.zst
Revised autoreload interface
Make the header only contain the public interface and nothing from the implementation. All functions get a handle to their self object, like the img_ and tns_ and win_ functions. All necessary data (file path) is also passed as an argument, so that no extern redeclarations are needed. Make arl_setup_dir() private, it's not called outside the module. Make arl_handle() return true if the file has changed, so that the reloading of the file can be done by the caller.
Diffstat (limited to 'autoreload_nop.c')
-rw-r--r--autoreload_nop.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/autoreload_nop.c b/autoreload_nop.c
index 19641f8..41dbf47 100644
--- a/autoreload_nop.c
+++ b/autoreload_nop.c
@@ -18,14 +18,26 @@
#include "autoreload.h"
-void arl_cleanup(void) { }
-
-void arl_handle(void) { }
-
-void arl_init(void) { }
-
-void arl_setup(void) { }
-
-void arl_setup_dir(void) { }
-
+void arl_cleanup(arl_t *arl)
+{
+ (void) arl;
+}
+
+bool arl_handle(arl_t *arl, const char *filepath)
+{
+ (void) arl;
+ (void) filepath;
+ return false;
+}
+
+void arl_init(arl_t *arl)
+{
+ (void) arl;
+}
+
+void arl_setup(arl_t *arl, const char *filepath)
+{
+ (void) arl;
+ (void) filepath;
+}