slightly improve command_defs[]

* make the struct `const`
* use designated initializers
* remove `CMD_NOxyz` macros
* fix function-pointer correctness of `sub_func[]`

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2022-12-20 09:29:36 +01:00
parent e9aaba938b
commit a45f05a45e
5 changed files with 272 additions and 461 deletions

View File

@@ -1315,7 +1315,7 @@ cmd_ac_add_help(const char* const value)
}
void
cmd_ac_add_cmd(Command* command)
cmd_ac_add_cmd(const Command* command)
{
autocomplete_add(commands_ac, command->cmd);
autocomplete_add(help_ac, command->cmd + 1);