1
0

Implemented menu item generators (closes #4) (#28)

* Implemented menu item generators (closes #4)
* Initialized sz to -1 for nm_generator_do
* Cleaned up extra semicolon in config.c
* Fixed typo in generator size check
This commit is contained in:
Patrick Gaskin
2020-05-25 06:57:59 -04:00
committed by GitHub
parent 242c6ee7b5
commit c4ab0154bc
10 changed files with 286 additions and 15 deletions

View File

@@ -57,9 +57,15 @@ __attribute__((constructor)) void nm_init() {
items[0]->action->on_success = true;
free(err);
} else if (!(items = nm_config_get_menu(cfg, &items_n))) {
NM_LOG("error: could not allocate memory, stopping");
goto stop_fs;
} else {
NM_LOG("init: generating items");
nm_config_generate(cfg);
NM_LOG("init: getting menu");
if (!(items = nm_config_get_menu(cfg, &items_n))) {
NM_LOG("error: could not allocate memory, stopping");
goto stop_fs;
}
}
NM_LOG("init: opening libnickel");