31typedef struct cmd_iter_s {
67 cmd->cbuf->wait =
true;
114 Con_Printf(
"usage: defer <seconds> <command>\n"
152 if(existing && existing->
pending)
195 cbuf->
size += cmdsize;
212 unsigned int cmdsize = 0, start = 0, pos;
213 qbool quotes =
false, comment =
false;
215 for (pos = 0; text[pos]; ++pos)
220 if (comment || quotes)
231 else if (existing && existing->
pending)
236 if (!quotes && text[pos + 1] ==
'/' && (pos == 0 ||
ISWHITESPACE(text[pos - 1])))
240 if (!comment && (pos == 0 || text[pos - 1] !=
'\\'))
268 llist_t llist = {&llist, &llist};
272 Con_Printf(
CON_WARN "Cbuf_AddText: input too large, %luKB ought to be enough for anybody.\n", (
unsigned long)(cbuf->
maxsize / 1024));
295 llist_t llist = {&llist, &llist};
300 Con_Printf(
CON_WARN "Cbuf_InsertText: input too large, %luKB ought to be enough for anybody.\n", (
unsigned long)(cbuf->
maxsize / 1024));
334 current->
delay -= eat;
335 if(current->
delay <= 0)
392 Con_Printf(
CON_WARN "Cbuf_Execute: runaway loop counter hit limit of %d commands, clearing command buffers!\n",
i);
471 Con_Print(
"stuffcmds : execute command line parameters\n");
519 size_t filenameLen =
strlen(filename);
521 !strcmp(filename,
"default.cfg") ||
522 (filenameLen >= 12 && !strcmp(filename + filenameLen - 12,
"/default.cfg"));
524 if (!strcmp(filename,
"config.cfg"))
557"sv_gameplayfix_upwardvelocityclearsongroundflag 0\n"
559"sv_gameplayfix_blowupfallenzombies 0\n"
566"sv_gameplayfix_blowupfallenzombies 0\n"
570"sv_gameplayfix_slidemoveprojectiles 0\n"
576"sv_gameplayfix_blowupfallenzombies 0\n"
579"mod_q1bsp_traceoutofsolid 0\n"
586"r_shadow_bumpscale_basetexture 4\n"
591"sv_gameplayfix_q2airaccelerate 1\n"
592"sv_gameplayfix_stepmultipletimes 1\n"
596"csqc_polygons_defaultmaterial_nocullface 1\n"
597"con_chatsound_team_mask 13\n"
605"mod_q1bsp_zero_hullsize_cutoff 8.03125\n"
609"csqc_polygons_defaultmaterial_nocullface 1\n"
610"con_chatsound_team_mask 13\n"
617"cl_csqc_generatemousemoveevents 0\n"
618"csqc_polygons_defaultmaterial_nocullface 1\n"
624"sv_gameplayfix_impactbeforeonground 1\n"
626"sv_gameplayfix_unstickentities 1\n"
641"sv_init_frame_count 3\n"
652"sv_gameplayfix_blowupfallenzombies 0\n"
653"sv_gameplayfix_findradiusdistancetobox 0\n"
654"sv_gameplayfix_grenadebouncedownslopes 0\n"
655"sv_gameplayfix_slidemoveprojectiles 0\n"
656"sv_gameplayfix_upwardvelocityclearsongroundflag 0\n"
657"sv_gameplayfix_setmodelrealbox 0\n"
658"sv_gameplayfix_droptofloorstartsolid 0\n"
659"sv_gameplayfix_droptofloorstartsolid_nudgetocorrect 0\n"
660"sv_gameplayfix_noairborncorpse 0\n"
661"sv_gameplayfix_noairborncorpse_allowsuspendeditems 0\n"
662"sv_gameplayfix_easierwaterjump 0\n"
663"sv_gameplayfix_delayprojectiles 0\n"
664"sv_gameplayfix_multiplethinksperframe 0\n"
665"sv_gameplayfix_fixedcheckwatertransition 0\n"
666"sv_gameplayfix_q1bsptracelinereportstexture 0\n"
667"sv_gameplayfix_swiminbmodels 0\n"
668"sv_gameplayfix_downtracesupportsongroundflag 0\n"
670"r_textbrightness 0.25\n"
671"r_textcontrast 1.25\n"
692 Con_Print(
"exec <filename> : execute a script file\n");
742 Con_Print(
"Toggle Console Variable - Usage\n toggle <variable> - toggles between 0 and 1\n toggle <variable> <value> - toggles between 0 and <value>\n toggle <variable> [string 1] [string 2]...[string n] - cycles through all strings\n");
776 for(nCnt = 2; nCnt < nNumArgs; nCnt++)
780 if( (nCnt + 1) == nNumArgs)
824 for (
a =
cmd->userdefined->alias ;
a ;
a=
a->next)
837 for (
a =
cmd->userdefined->alias ;
a ;
a=
a->next)
839 if (!strcmp(s,
a->name))
853 for( prev =
NULL, current =
cmd->userdefined->alias ; current && strcmp( current->
name,
a->name ) < 0 ; prev = current, current = current->
next )
858 cmd->userdefined->alias =
a;
867 for (
i=2 ;
i < c ;
i++)
875 alloclen =
strlen (line) + 1;
877 line[alloclen - 2] =
'\n';
879 memcpy (
a->value, line, alloclen);
897 Con_Print(
"unalias: Usage: unalias alias1 [alias2 ...]\n");
907 if(!strcmp(s,
a->name))
911 if(
a ==
cmd->userdefined->alias)
912 cmd->userdefined->alias =
a->next;
921 Con_Printf(
"unalias: %s alias not found\n", s);
938 static char vabuf[1024];
941 *is_multiple =
false;
943 if(!varname || !*varname)
948 if(!strcmp(varname,
"*"))
954 else if(!strcmp(varname,
"#"))
958 else if(varname[
strlen(varname) - 1] ==
'-')
960 argno = strtol(varname, &endptr, 10);
961 if(endptr == varname +
strlen(varname) - 1)
965 for(; argno > 1; --argno)
983 argno = strtol(varname, &endptr, 10);
1002 qbool quote_quot = !!strchr(quoteset,
'"');
1003 qbool quote_backslash = !!strchr(quoteset,
'\\');
1004 qbool quote_dollar = !!strchr(quoteset,
'$');
1013 *out++ =
'"'; --outlen;
1019 if(*in ==
'"' && quote_quot)
1023 *out++ =
'\\'; --outlen;
1024 *out++ =
'"'; --outlen;
1026 else if(*in ==
'\\' && quote_backslash)
1030 *out++ =
'\\'; --outlen;
1031 *out++ =
'\\'; --outlen;
1033 else if(*in ==
'$' && quote_dollar)
1037 *out++ =
'$'; --outlen;
1038 *out++ =
'$'; --outlen;
1044 *out++ = *in; --outlen;
1063 const char *varstr =
NULL;
1065 qbool required =
false;
1066 qbool optional =
false;
1067 static char asis[] =
"asis";
1071 memcpy(varname, var, varlen);
1072 varname[varlen] = 0;
1073 varfunc = strchr(varname,
' ');
1095 while((p = strchr(varfunc,
'?')))
1098 memmove(p, p+1,
strlen(p));
1101 while((p = strchr(varfunc,
'!')))
1104 memmove(p, p+1,
strlen(p));
1107 while((p = strchr(varfunc,
' ')))
1109 memmove(p, p+1,
strlen(p));
1116 if(varname[0] ==
'$')
1120 qbool is_multiple =
false;
1148 dpsnprintf(varval,
sizeof(varval),
"$%s", varname);
1153 if(!varfunc || !strcmp(varfunc,
"q"))
1160 else if(!strcmp(varfunc,
"asis"))
1165 Con_Printf(
"Unknown variable function %s\n", varfunc);
1184 if( maxoutlen == 0 ) {
1192 while( *in && outlen < maxoutlen ) {
1252 }
else if(*in ==
'{') {
1253 varlen = strcspn(in + 1,
"}");
1254 if(in[varlen + 1] ==
'}')
1268 varlen = strspn(in,
"#*0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-");
1277 while(*val && outlen < maxoutlen)
1278 outtext[outlen++] = *val++;
1284 outtext[outlen++] =
'$';
1285 while(eat && outlen < maxoutlen)
1287 outtext[outlen++] = *in++;
1293 outtext[outlen++] = *in++;
1295 outtext[outlen] =
'\0';
1326 size_t preprocessed_len;
1327 const char *firstchar;
1332 if((strncmp(firstchar,
"alias", 5) || !
ISWHITESPACE(firstchar[5]))
1333 && (strncmp(firstchar,
"bind", 4) || !
ISWHITESPACE(firstchar[4]))
1334 && (strncmp(firstchar,
"in_bind", 7) || !
ISWHITESPACE(firstchar[7])))
1355 const char *partial;
1364 ispattern = (strchr(partial,
'*') || strchr(partial,
'?'));
1374 for (func =
cmd->userdefined->qc_functions; func; func = func->
next)
1381 for (func =
cmd->engine_functions; func; func = func->
next)
1405 const char *partial;
1418 ispattern = partial && (strchr(partial,
'*') || strchr(partial,
'?'));
1420 partial =
va(vabuf,
sizeof(vabuf),
"*%s*", partial);
1432 for (
char **cvar_alias =
cvar->aliases; cvar_alias && *cvar_alias; cvar_alias++)
1442 for (func =
cmd->userdefined->qc_functions; func; func = func->
next)
1450 for (func =
cmd->engine_functions; func; func = func->
next)
1458 for (alias =
cmd->userdefined->alias; alias; alias = alias->
next)
1477 cmd->null_string =
"";
1480 cmd->cvars_flagsmask = cvars_flagsmask;
1481 cmd->cmd_flagsmask = cmds_flagsmask;
1482 cmd->userdefined = userdefined;
1495 unsigned cvars_flagsmask, cmds_flagsmask;
1546 Cmd_AddCommand(
CF_SHARED,
"alias",
Cmd_Alias_f,
"create a script function (parameters are passed in as $X (being X a number), $* for all parameters, $X- for all parameters starting from $X). Without arguments show the list of all alias");
1552#ifdef FILLALLCVARSWITHRUBBISH
1553 Cmd_AddCommand(
CF_SHARED,
"fillallcvarswithrubbish", Cvar_FillAll_f,
"fill all cvars with a specified number of characters to provoke buffer overruns");
1582 if (
cmd->cbuf->lock)
1612 while (*text &&
ISWHITESPACE(*text) && *text !=
'\r' && *text !=
'\n')
1619 if (*text ==
'\n' || *text ==
'\r')
1622 if (*text ==
'\r' && text[1] ==
'\n')
1632 cmd->cmdline = text;
1647 memcpy (
cmd->cbuf->tokenizebuffer +
cmd->cbuf->tokenizebufferpos,
com_token, l);
1648 cmd->argv[
cmd->argc] =
cmd->cbuf->tokenizebuffer +
cmd->cbuf->tokenizebufferpos;
1649 cmd->cbuf->tokenizebufferpos += l;
1668 for (
i = 0;
i < 2;
i++)
1683 for (func =
cmd->engine_functions; func; func = func->
next)
1685 if (!strcmp(cmd_name, func->
name))
1694 func->
name = cmd_name;
1697 func->
next =
cmd->engine_functions;
1700 for (prev =
NULL, current =
cmd->engine_functions; current && strcmp(current->
name, func->
name) < 0; prev = current, current = current->
next)
1706 cmd->engine_functions = func;
1708 func->
next = current;
1713 for (func =
cmd->userdefined->qc_functions; func; func = func->
next)
1715 if (!strcmp(cmd_name, func->
name))
1724 func->
name = cmd_name;
1728 func->
next =
cmd->userdefined->qc_functions;
1734 if (!strcmp(cmd_name,
f->name))
1736 Con_DPrintf(
"Adding QC override of engine command %s\n", cmd_name);
1743 for (prev =
NULL, current =
cmd->userdefined->qc_functions; current && strcmp(current->
name, func->
name) < 0; prev = current, current = current->
next)
1749 cmd->userdefined->qc_functions = func;
1751 func->
next = current;
1766 for (func =
cmd->userdefined->qc_functions; func; func = func->
next)
1767 if (!strcmp(cmd_name, func->
name))
1770 for (func=
cmd->engine_functions ; func ; func=func->
next)
1771 if (!strcmp (cmd_name,func->
name))
1794 for (func =
cmd->userdefined->qc_functions; func; func = func->
next)
1795 if (!strncasecmp(partial, func->
name, len))
1798 for (func =
cmd->engine_functions; func; func = func->
next)
1799 if (!strncasecmp(partial, func->
name, len))
1827 for (func =
cmd->userdefined->qc_functions; func; func = func->
next)
1828 if (!strncasecmp(partial, func->
name, len))
1831 for (func =
cmd->engine_functions; func; func = func->
next)
1832 if (!strncasecmp(partial, func->
name, len))
1858 for (func =
cmd->userdefined->qc_functions; func; func = func->
next)
1859 if (!strncasecmp(partial, func->
name, len))
1861 for (func =
cmd->engine_functions; func; func = func->
next)
1862 if (!strncasecmp(partial, func->
name, len))
1873 size_t len =
strlen(partial);
1875 for (func =
cmd->userdefined->qc_functions; func; func = func->
next)
1876 if (!strncasecmp(partial, func->
name, len))
1878 for (func =
cmd->engine_functions; func; func = func->
next)
1879 if (!strncasecmp(partial, func->
name, len))
1903 for (alias =
cmd->userdefined->alias; alias; alias = alias->
next)
1904 if (!strncasecmp(partial, alias->
name, len))
1914 size_t len =
strlen(partial);
1916 for (alias =
cmd->userdefined->alias; alias; alias = alias->
next)
1917 if (!strncasecmp(partial, alias->
name, len))
1945 for (alias =
cmd->userdefined->alias; alias; alias = alias->
next)
1946 if (!strncasecmp(partial, alias->
name, len))
1972 for (alias =
cmd->userdefined->alias; alias; alias = alias->
next)
1973 if (!strncasecmp(partial, alias->
name, len))
2038 Con_Printf(
CON_WARN "Cannot execute client commands from a dedicated server console.\n");
2076 oldpos =
cmd->cbuf->tokenizebufferpos;
2086 for (func =
cmd->userdefined->qc_functions; func; func = func->
next)
2087 if (!strcasecmp(
cmd->argv[0], func->
name))
2088 if(
cmd->Handle(
cmd, func, text, textlen,
src))
2089 goto functions_done;
2091 for (func =
cmd->engine_functions; func; func=func->
next)
2092 if (!strcasecmp (
cmd->argv[0], func->
name))
2093 if(
cmd->Handle(
cmd, func, text, textlen,
src))
2094 goto functions_done;
2108 for (
a=
cmd->userdefined->alias ;
a ;
a=
a->next)
2110 if (!strcasecmp (
cmd->argv[0],
a->name))
2126 cmd->cbuf->tokenizebufferpos = oldpos;
2167 for (
f =
cmd->userdefined->qc_functions;
f;
f =
f->next)
2168 f->initstate =
true;
2169 for (
f =
cmd->engine_functions;
f;
f =
f->next)
2170 f->initstate =
true;
2171 for (
a =
cmd->userdefined->alias;
a;
a =
a->next)
2173 a->initstate =
true;
2188 for (fp = &
cmd->userdefined->qc_functions; (
f = *fp);)
2195 Con_DPrintf(
"Cmd_RestoreInitState: Destroying command %s\n",
f->name);
2200 for (fp = &
cmd->engine_functions; (
f = *fp);)
2207 Con_DPrintf(
"Cmd_RestoreInitState: Destroying command %s\n",
f->name);
2212 for (ap = &
cmd->userdefined->alias; (
a = *ap);)
2217 if (strcmp(
a->value ?
a->value :
"",
a->initialvalue ?
a->initialvalue :
""))
2219 Con_DPrintf(
"Cmd_RestoreInitState: Restoring alias %s\n",
a->name);
2229 Con_DPrintf(
"Cmd_RestoreInitState: Destroying alias %s\n",
a->name);
void CL_ForwardToServer_f(cmd_state_t *cmd)
adds the current command line as a clc_stringcmd to the client message.
static void Cmd_Wait_f(cmd_state_t *cmd)
void Cbuf_Clear(cmd_buf_t *cbuf)
Clears all command buffers.
static void Cmd_Apropos_f(cmd_state_t *cmd)
static void Cmd_Defer_f(cmd_state_t *cmd)
static void Cmd_TokenizeString(cmd_state_t *cmd, const char *text)
static void Cmd_List_f(cmd_state_t *cmd)
static cmd_iter_t * cmd_iter_all
void Cmd_CompleteCommandPrint(cmd_state_t *cmd, const char *partial)
static void Cmd_ExecuteAlias(cmd_state_t *cmd, cmd_alias_t *alias)
const char * Cmd_CompleteAlias(cmd_state_t *cmd, const char *partial)
static void Cbuf_Frame_Input(void)
void Cbuf_InsertText(cmd_state_t *cmd, const char *text)
void Cbuf_Unlock(cmd_buf_t *cbuf)
void Cmd_SaveInitState(void)
called by Host_Init, this marks cvars, commands and aliases with their init values
qbool Cmd_SV_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, size_t textlen, cmd_source_t src)
static void Cmd_Exec(cmd_state_t *cmd, const char *filename)
const char ** Cmd_CompleteBuildList(cmd_state_t *cmd, const char *partial)
static void Cmd_StuffCmds_f(cmd_state_t *cmd)
void Cbuf_AddText(cmd_state_t *cmd, const char *text)
cmd_userdefined_t cmd_userdefined_all
aliases and csqc functions
int Cmd_CheckParm(cmd_state_t *cmd, const char *parm)
Returns the position (1 to argc-1) in the command's argument list where the given parameter apears,...
static cmd_input_t * Cbuf_NodeGet(cmd_buf_t *cbuf, cmd_input_t *existing)
void Cmd_RestoreInitState(void)
Restores cvars, commands and aliases to their init values and deletes any that were added since init.
static void Cbuf_ParseText(cmd_state_t *cmd, llist_t *head, cmd_input_t *existing, const char *text, qbool allowpending)
int Cmd_CompleteCountPossible(cmd_state_t *cmd, const char *partial)
void Cmd_Init(void)
Command execution takes a null terminated string, breaks it into tokens, then searches for a command ...
static void Cmd_Echo_f(cmd_state_t *cmd)
void Cbuf_Frame(cmd_buf_t *cbuf)
void Cmd_AddCommand(unsigned flags, const char *cmd_name, xcommand_t function, const char *description)
called by the init functions of other parts of the program to register commands and functions to call...
void Cmd_ClearCSQCCommands(cmd_state_t *cmd)
const char * Cmd_CompleteCommand(cmd_state_t *cmd, const char *partial)
attempts to match a partial command for automatic command line completion returns NULL if nothing fit...
static cmd_state_t * Cmd_AddInterpreter(cmd_buf_t *cbuf, cvar_state_t *cvars, unsigned cvars_flagsmask, unsigned cmds_flagsmask, cmd_userdefined_t *userdefined)
void Cmd_CompleteAliasPrint(cmd_state_t *cmd, const char *partial)
static void Cmd_UnAlias_f(cmd_state_t *cmd)
void Cmd_ExecuteString(cmd_state_t *cmd, const char *text, size_t textlen, cmd_source_t src, qbool lockmutex)
Parses a single line of text into arguments and tries to execute it.
qbool Cmd_QuoteString(char *out, size_t outlen, const char *in, const char *quoteset, qbool putquotes)
quotes a string so that it can be used as a command argument again; quoteset is a string that contain...
qbool Cmd_CL_Callback(cmd_state_t *cmd, cmd_function_t *func, const char *text, size_t textlen, cmd_source_t src)
cmd_state_t * cmd_local
command interpreter for local commands injected by SVQC, CSQC, MQC, server or client engine code uses...
static void Cmd_Toggle_f(cmd_state_t *cmd)
int Cmd_CompleteAliasCountPossible(cmd_state_t *cmd, const char *partial)
cmd_state_t * cmd_serverfromclient
command interpreter for server commands received over network from clients uses cmddefs_null
const char ** Cmd_CompleteAliasBuildList(cmd_state_t *cmd, const char *partial)
qbool Cmd_Exists(cmd_state_t *cmd, const char *cmd_name)
used by the cvar code to check for cvar / command name overlap
static size_t Cmd_PreprocessString(cmd_state_t *cmd, const char *intext, char *outtext, unsigned maxoutlen, cmd_alias_t *alias)
Cmd_PreprocessString.
static void Cbuf_Execute_Deferred(cmd_buf_t *cbuf)
static void Cmd_Exec_f(cmd_state_t *cmd)
void Cmd_PreprocessAndExecuteString(cmd_state_t *cmd, const char *text, size_t textlen, cmd_source_t src, qbool lockmutex)
Like Cmd_ExecuteString, but with variable expansion.
static void Cbuf_LinkString(cmd_state_t *cmd, llist_t *head, cmd_input_t *existing, const char *text, qbool leavepending, unsigned int cmdsize)
void Cbuf_Lock(cmd_buf_t *cbuf)
static const char * Cmd_GetDirectCvarValue(cmd_state_t *cmd, const char *varname, cmd_alias_t *alias, qbool *is_multiple)
static void Cmd_Alias_f(cmd_state_t *cmd)
void Cbuf_Execute(cmd_buf_t *cbuf)
static const char * Cmd_GetCvarValue(cmd_state_t *cmd, const char *var, size_t varlen, cmd_alias_t *alias)
cmd_userdefined_t cmd_userdefined_null
intentionally empty
void Cmd_NoOperation_f(cmd_state_t *cmd)
qbool Cmd_Callback(cmd_state_t *cmd, cmd_function_t *func)
@ src_client
came in over a net connection as a clc_stringcmd host_client will be valid during this state.
@ src_local
from the command buffer
#define CF_USERINFO
command or cvar used to communicate userinfo to the server
#define CF_SERVER
cvar/command that only the server can change/execute
static int Cmd_Argc(cmd_state_t *cmd)
static const char * Cmd_Argv(cmd_state_t *cmd, int arg)
Cmd_Argv(cmd, ) will return an empty string (not a NULL) if arg > argc, so string operations are alwa...
#define CF_SERVER_FROM_CLIENT
command the client is allowed to execute on the server as a stringcmd
#define CF_CLIENT
cvar/command that only the client can change/execute
#define CF_CHEAT
command or cvar that gives an unfair advantage over other players and is blocked unless sv_cheats is ...
#define CF_CLIENT_FROM_SERVER
command that the server is allowed to execute on the client
static const char * Cmd_Args(cmd_state_t *cmd)
void(* xcommand_t)(struct cmd_state_s *cmd)
#define CF_PRIVATE
cvar should not be $ expanded or sent to the server under any circumstances (rcon_password,...
gamemode_t com_startupgamegroup
@ GAME_STEELSTORM
added by motorsep
@ GAME_QUAKE15
added by bones_was_here as it depends on an old bug and a workaround
@ GAME_CTSJ2
added by bones_was_here as it has a race condition that requires a workaound
@ GAME_TENEBRAE
full of evil hackery
@ GAME_AD
added by bones_was_here as it depends on old DP behaviour or csqc_lowres
static void List_Splice_Tail(const llist_t *list, llist_t *head)
#define List_Entry(ptr, type, member)
static void List_Move_Tail(llist_t *list, llist_t *head)
#define List_For_Each_Entry_Safe(pos, n, head, type, member)
#define List_For_Each_Entry(pos, head, type, member)
static void List_Splice(const llist_t *list, llist_t *head)
static qbool List_Is_Empty(const llist_t *list)
char * dp_ustr2stp(char *dst, size_t dsize, const char *src, size_t slen)
Copies a measured byte sequence (unterminated string) to a null-terminated string.
char com_token[MAX_INPUTLINE]
char * va(char *buf, size_t buflen, const char *format,...)
qbool COM_ParseToken_Console(const char **datapointer)
int dpsnprintf(char *buffer, size_t buffersize, const char *format,...)
Returns the number of printed characters, excluding the final '\0' or returns -1 if the buffer isn't ...
#define dp_strlcat(dst, src, dsize)
#define dp_strlcpy(dst, src, dsize)
void Con_Print(const char *msg)
Prints to all appropriate console targets, and adds timestamps.
void Con_DPrintf(const char *fmt,...)
A Con_Printf that only shows up if the "developer" cvar is set.
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
qbool CL_VM_ConsoleCommand(const char *text, size_t textlen)
void Cvar_Del_f(cmd_state_t *cmd)
void Cvar_ResetToDefaults_NoSaveOnly_f(cmd_state_t *cmd)
void Cvar_ResetToDefaults_All_f(cmd_state_t *cmd)
void Cvar_SaveInitState(cvar_state_t *cvars)
void Cvar_Set_f(cmd_state_t *cmd)
void Cvar_SetValueQuick(cvar_t *var, float value)
void Cvar_SetQuick(cvar_t *var, const char *value)
void Cvar_LockDefaults_f(cmd_state_t *cmd)
void Cvar_PrintHelp(cvar_t *cvar, const char *name, qbool full)
void Cvar_SetA_f(cmd_state_t *cmd)
void Cvar_List_f(cmd_state_t *cmd)
cvar_t * Cvar_FindVar(cvar_state_t *cvars, const char *var_name, unsigned neededflags)
void Cvar_ResetToDefaults_SaveOnly_f(cmd_state_t *cmd)
void Cvar_RestoreInitState(cvar_state_t *cvars)
qbool Cvar_Command(cmd_state_t *cmd)
int matchpattern_with_separator(const char *in, const char *pattern, int caseinsensitive, const char *separators, qbool wildcard_least_one)
unsigned char * FS_LoadFile(const char *path, mempool_t *pool, qbool quiet, fs_offset_t *filesizepointer)
void FS_FreeSearch(fssearch_t *search)
fssearch_t * FS_Search(const char *pattern, int caseinsensitive, int quiet, const char *packfile)
static int(ZEXPORT *qz_inflate)(z_stream *strm
GLenum GLenum GLsizei count
GLuint GLuint GLintptr offset
GLenum GLuint GLenum GLsizei const GLchar * buf
#define MAX_INPUTLINE
maximum size of console commandline, QuakeC strings, and many other text processing buffers
#define MAX_ARGS
maximum number of parameters to a console command or alias
#define CMD_TOKENIZELENGTH
maximum tokenizable commandline length (counting trailing 0)
#define CMDBUFSIZE
maximum script size that can be loaded by the exec command (8192 in Quake)
#define SV_LockThreadMutex()
#define SV_UnlockThreadMutex()
qbool SV_VM_ConsoleCommand(const char *text, size_t textlen)
void SV_ClientPrintf(const char *fmt,...) DP_FUNC_PRINTF(1)
char name[MAX_SCOREBOARDNAME]
struct cmd_alias_s * next
char name[MAX_ALIAS_NAME]
struct cmd_function_s * overridden
the engine cmd overriden by this QC cmd, if applicable
struct cmd_function_s * next
command interpreter state - the tokenizing and execution of commands, as well as pointers to which cv...
qbool(* Handle)(struct cmd_state_s *, struct cmd_function_s *, const char *, size_t, enum cmd_source_s)
struct mempool_s * mempool
container for user-defined QC functions and aliases, shared between different command interpreters
unsigned int framecount
incremented every frame, never reset, >0 means Host_AbortCurrentFrame() is possible
double realtime
the accumulated mainloop time since application started (with filtering), without any slowmo or clamp...
char * Sys_ConsoleInput(void)
Reads a line from POSIX stdin or the Windows console.
int Sys_CheckParm(const char *parm)
#define Thread_CreateMutex()
#define Thread_LockMutex(m)
#define Thread_UnlockMutex(m)
#define Mem_FreePool(pool)
#define Mem_Alloc(pool, size)
#define Mem_strdup(pool, s)
#define Mem_AllocPool(name, flags, parent)
#define Mem_Realloc(pool, data, size)