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>
|
#include <stdint.h>
|
||||||
|
|
||||||
semver version(void);
|
semver version(void);
|
||||||
|
const char *name(void);
|
||||||
const char *module_name(void);
|
|
||||||
const char *get(void);
|
|
||||||
|
|
||||||
void init(char **config);
|
void init(char **config);
|
||||||
|
const char *get(void);
|
||||||
|
|
||||||
#endif // _MODFETCH_MOD_H
|
#endif // _MODFETCH_MOD_H
|
||||||
|
|
|
@ -265,16 +265,16 @@ int main(int argc, char *argv[]) {
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||||
semver (*version)(void) = dlsym(handle, "version");
|
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");
|
const char *(*get)(void) = dlsym(handle, "get");
|
||||||
void (*init)(char**) = dlsym(handle, "init");
|
void (*init)(char**) = dlsym(handle, "init");
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
init(current_module.config);
|
init(current_module.config);
|
||||||
|
|
||||||
(void)module_name;
|
(void)name;
|
||||||
(void)version;
|
(void)version;
|
||||||
// printf("%s: %s\n", module_name(), svtoa(version()));
|
// printf("%s: %s\n", name(), svtoa(version()));
|
||||||
printf("%s\n", get());
|
printf("%s\n", get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ static const semver _version = {
|
||||||
};
|
};
|
||||||
|
|
||||||
semver version(void) { return _version; }
|
semver version(void) { return _version; }
|
||||||
const char *module_name(void) { return "desktop"; }
|
const char *name(void) { return "desktop"; }
|
||||||
|
|
||||||
void init(char **config) {
|
void init(char **config) {
|
||||||
(void)config;
|
(void)config;
|
||||||
|
|
|
@ -17,7 +17,7 @@ static const semver _version = {
|
||||||
};
|
};
|
||||||
|
|
||||||
semver version(void) { return _version; }
|
semver version(void) { return _version; }
|
||||||
const char *module_name(void) { return "os"; }
|
const char *name(void) { return "os"; }
|
||||||
|
|
||||||
void init(char **config) {
|
void init(char **config) {
|
||||||
(void)config;
|
(void)config;
|
||||||
|
|
|
@ -19,7 +19,7 @@ static const semver _version = {
|
||||||
};
|
};
|
||||||
|
|
||||||
semver version(void) { return _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 size_t length = 8;
|
||||||
static char *sep_char = "-";
|
static char *sep_char = "-";
|
||||||
|
|
Loading…
Reference in a new issue