From dd7455e12aa294d8e368b8c51536ff701d1942b5 Mon Sep 17 00:00:00 2001 From: Cloudwalk Date: Thu, 17 Sep 2020 01:18:18 -0400 Subject: [PATCH] cmd: Stub some data structures that'll end up being used eventually --- cmd.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/cmd.h b/cmd.h index 9ef9a9ab..1674673a 100644 --- a/cmd.h +++ b/cmd.h @@ -151,6 +151,36 @@ typedef struct cmd_state_s } cmd_state_t; +typedef enum cmd_type_e +{ + cmdtype_command, + cmdtype_cvar, + cmdtype_alias +} cmd_type_t; + +typedef struct cmd_object_s +{ + cmd_type_t type; + int flags; + void *object; + char *name; + char *description; +} cmd_object_t; + +typedef struct cmd_s +{ + mempool_t *mempool; + + cmd_state_t state; + cmd_buf_t buffer; + cmd_object_t *objects; + + int cmd_flagsmask; + int cvar_flagsmask; + int auto_flagsmask; // Automatically add command if it matches these flags... + xcommand_t *auto_function; // ...with this function. +} cmd_t; + typedef struct cmd_input_s { llist_t list; -- 2.39.2