diff --git a/mod.h b/mod.h index 7c5ca98..3580234 100644 --- a/mod.h +++ b/mod.h @@ -5,10 +5,9 @@ #include semver version(void); - -const char *module_name(void); -const char *get(void); +const char *name(void); void init(char **config); +const char *get(void); #endif // _MODFETCH_MOD_H diff --git a/modfetch.c b/modfetch.c index 40d1f3d..6391e30 100644 --- a/modfetch.c +++ b/modfetch.c @@ -265,16 +265,16 @@ int main(int argc, char *argv[]) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" semver (*version)(void) = dlsym(handle, "version"); - const char *(*module_name)(void) = dlsym(handle, "module_name"); + const char *(*name)(void) = dlsym(handle, "name"); const char *(*get)(void) = dlsym(handle, "get"); void (*init)(char**) = dlsym(handle, "init"); #pragma GCC diagnostic pop init(current_module.config); - (void)module_name; + (void)name; (void)version; - // printf("%s: %s\n", module_name(), svtoa(version())); + // printf("%s: %s\n", name(), svtoa(version())); printf("%s\n", get()); } diff --git a/modules/desktop.c b/modules/desktop.c index eb913db..27e5b17 100644 --- a/modules/desktop.c +++ b/modules/desktop.c @@ -15,7 +15,7 @@ static const semver _version = { }; semver version(void) { return _version; } -const char *module_name(void) { return "desktop"; } +const char *name(void) { return "desktop"; } void init(char **config) { (void)config; diff --git a/modules/os.c b/modules/os.c index eec18d3..eb8fc05 100644 --- a/modules/os.c +++ b/modules/os.c @@ -17,7 +17,7 @@ static const semver _version = { }; semver version(void) { return _version; } -const char *module_name(void) { return "os"; } +const char *name(void) { return "os"; } void init(char **config) { (void)config; diff --git a/modules/sep.c b/modules/sep.c index daf6eaa..0320598 100644 --- a/modules/sep.c +++ b/modules/sep.c @@ -19,7 +19,7 @@ static const semver _version = { }; semver version(void) { return _version; } -const char *module_name(void) { return "sep"; } +const char *name(void) { return "sep"; } static size_t length = 8; static char *sep_char = "-";