From 3724d3fc17dc6135a05608cab5bdf00c6978282d Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Wed, 17 May 2017 20:07:32 +0200 Subject: 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. --- autoreload_nop.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'autoreload_nop.c') 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; +} -- cgit v1.2.3-54-g00ecf