diff options
Diffstat (limited to 'src/commands.h')
| -rw-r--r-- | src/commands.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/commands.h b/src/commands.h index e3168a5..e7e71f6 100644 --- a/src/commands.h +++ b/src/commands.h @@ -37,10 +37,15 @@ struct command { size_t nargs; }; +struct cmd_table { + const struct command *cmds; + size_t n; +}; + #define CMD_ARGS(a) (a), (sizeof (a) / sizeof (a)[0]) -extern const struct command g_commands[]; -extern const size_t g_commands_count; +extern const struct cmd_table *const g_command_tables[]; +extern const size_t g_command_tables_count; int command_validate_args(const struct command *cmd, yyjson_val *args, char *err, size_t errlen); |
