]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cmd.h
cmd: Rename cmdalias_t to cmd_alias_t for consistency.
[xonotic/darkplaces.git] / cmd.h
diff --git a/cmd.h b/cmd.h
index b1218a73783f8f529ea5d527c1df3957685f08d4..3a456429ad6e58d0877b35bf3cff0fb07b80c2b1 100644 (file)
--- a/cmd.h
+++ b/cmd.h
@@ -58,17 +58,17 @@ typedef enum
 {
        src_client,             ///< came in over a net connection as a clc_stringcmd
                                        ///< host_client will be valid during this state.
-       src_command             ///< from the command buffer
+       src_local               ///< from the command buffer
 } cmd_source_t;
 
-typedef struct cmdalias_s
+typedef struct cmd_alias_s
 {
-       struct cmdalias_s *next;
+       struct cmd_alias_s *next;
        char name[MAX_ALIAS_NAME];
        char *value;
        qboolean initstate; // indicates this command existed at init
        char *initialvalue; // backup copy of value at init
-} cmdalias_t;
+} cmd_alias_t;
 
 typedef struct cmd_function_s
 {
@@ -96,7 +96,7 @@ typedef struct cmd_userdefined_s
        cmd_function_t *csqc_functions;
 
        // aliases
-       cmdalias_t *alias;
+       cmd_alias_t *alias;
 }
 cmd_userdefined_t;
 
@@ -136,7 +136,7 @@ cmd_state_t;
 
 typedef struct cbuf_cmd_s
 {
-       struct cbuf_cmd_s *prev, *next;
+       llist_t list;
        cmd_state_t *source;
        double delay;
        size_t size;
@@ -146,9 +146,9 @@ typedef struct cbuf_cmd_s
 
 typedef struct cbuf_s
 {
-       cbuf_cmd_t *start;
-       cbuf_cmd_t *deferred;
-       cbuf_cmd_t *free;
+       llist_t start;
+       llist_t deferred;
+       llist_t free;
        qboolean wait;
        size_t maxsize;
        size_t size;
@@ -222,6 +222,8 @@ void Cmd_AddCommand(int flags, const char *cmd_name, xcommand_t function, const
 // register commands and functions to call for them.
 // The cmd_name is referenced later, so it should not be in temp memory
 
+cmd_function_t *Cmd_GetCommand(cmd_state_t *cmd, const char *partial, size_t len, qboolean casesensitive);
+
 /// used by the cvar code to check for cvar / command name overlap
 qboolean Cmd_Exists (cmd_state_t *cmd, const char *cmd_name);