diff options
| author | Albert Cervin <albert@acervin.com> | 2023-04-06 21:22:53 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2023-04-06 21:22:53 +0200 |
| commit | f828f30709b2ce76bf41a768aca5948459f268d2 (patch) | |
| tree | 9f12af9e1880eae570f695b390a66d91efb32b3d /src/settings.h | |
| parent | 0006d8b9f261960074b92dde98e49872ba5673fb (diff) | |
| download | dged-f828f30709b2ce76bf41a768aca5948459f268d2.tar.gz dged-f828f30709b2ce76bf41a768aca5948459f268d2.tar.xz dged-f828f30709b2ce76bf41a768aca5948459f268d2.zip | |
some minor cleanup
Diffstat (limited to 'src/settings.h')
| -rw-r--r-- | src/settings.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/settings.h b/src/settings.h index a2387ed..20cca24 100644 --- a/src/settings.h +++ b/src/settings.h @@ -1,9 +1,10 @@ -#include "command.h" #include "hashmap.h" #include <stdbool.h> #include <stdint.h> +struct commands; + /** * The type of setting value. */ @@ -68,7 +69,7 @@ struct settings { * @param initial_capacity Initial capacity of the settings collection. * @returns Nothing, the settings collection is a global instance. */ -void settings_init(uint32_t initial_capacity); +void settings_init(uint32_t initial_capacity, struct commands *commands); /** * Destroy the global collection of settings. @@ -116,11 +117,3 @@ void settings_get_prefix(const char *prefix, struct setting **settings_out[], * type for the setting. If not, the new value is ignored. */ void settings_set(const char *path, struct setting_value value); - -int32_t settings_get_cmd(struct command_ctx ctx, int argc, const char *argv[]); -int32_t settings_set_cmd(struct command_ctx ctx, int argc, const char *argv[]); - -static struct command SETTINGS_COMMANDS[] = { - {.name = "set", .fn = settings_set_cmd}, - {.name = "get", .fn = settings_get_cmd}, -}; |
