diff options
Diffstat (limited to 'src/qcommon/qcommon.h')
-rw-r--r-- | src/qcommon/qcommon.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h index d6f7ea03..e4234f54 100644 --- a/src/qcommon/qcommon.h +++ b/src/qcommon/qcommon.h @@ -153,6 +153,7 @@ typedef struct { byte ip6[16]; unsigned short port; + unsigned long scope_id; // Needed for IPv6 link-local addresses } netadr_t; void NET_Init( void ); @@ -341,12 +342,9 @@ void *VM_ExplicitArgPtr( vm_t *vm, intptr_t intValue ); #define VMA(x) VM_ArgPtr(args[x]) static ID_INLINE float _vmf(intptr_t x) { - union { - intptr_t l; - float f; - } t; - t.l = x; - return t.f; + floatint_t fi; + fi.i = (int) x; + return fi.f; } #define VMF(x) _vmf(args[x]) @@ -406,8 +404,14 @@ void Cmd_AddCommand( const char *cmd_name, xcommand_t function ); void Cmd_RemoveCommand( const char *cmd_name ); +typedef void (*completionFunc_t)( char *args, int argNum ); + void Cmd_CommandCompletion( void(*callback)(const char *s) ); // callback with each valid string +void Cmd_SetCommandCompletionFunc( const char *command, + completionFunc_t complete ); +void Cmd_CompleteArgument( const char *command, char *args, int argNum ); +void Cmd_CompleteCfgName( char *args, int argNum ); int Cmd_Argc (void); char *Cmd_Argv (int arg); @@ -417,6 +421,7 @@ char *Cmd_ArgsFrom( int arg ); void Cmd_ArgsBuffer( char *buffer, int bufferLength ); void Cmd_LiteralArgsBuffer( char *buffer, int bufferLength ); char *Cmd_Cmd (void); +void Cmd_Args_Sanitize( void ); // The functions that execute commands get their parameters with these // functions. Cmd_Argv () will return an empty string, not a NULL // if arg > argc, so string operations are allways safe. @@ -521,6 +526,8 @@ void Cvar_CheckRange( cvar_t *cv, float minVal, float maxVal, qboolean shouldBeI void Cvar_Restart_f( void ); +void Cvar_CompleteCvarName( char *args, int argNum ); + extern int cvar_modifiedFlags; // whenever a cvar is modifed, its flags will be OR'd into this, so // a single check can determine if any CVAR_USERINFO, CVAR_SERVERINFO, @@ -702,6 +709,11 @@ typedef struct { void Field_Clear( field_t *edit ); void Field_AutoComplete( field_t *edit ); +void Field_CompleteKeyname( void ); +void Field_CompleteFilename( const char *dir, + const char *ext, qboolean stripExt ); +void Field_CompleteCommand( char *cmd, + qboolean doCommands, qboolean doCvars ); /* ============================================================== |