module_name -> name
This commit is contained in:
parent
dfa4ea2f44
commit
ac6c61e10a
5 changed files with 8 additions and 9 deletions
5
mod.h
5
mod.h
|
@ -5,10 +5,9 @@
|
|||
#include <stdint.h>
|
||||
|
||||
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
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = "-";
|
||||
|
|
Loading…
Reference in a new issue