From 8351fa7752bb8341ef405a37ff7c73142715e981 Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Sun, 20 Sep 2026 20:11:19 +0200 Subject: commands: split the command table by domain --- src/commands.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/commands.h') 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); -- cgit v1.3