MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Cbuf_ExecuteText

Function Cbuf_ExecuteText

code/qcommon/cmd.cpp:145–167  ·  view source on GitHub ↗

============ Cbuf_ExecuteText ============ */

Source from the content-addressed store, hash-verified

143============
144*/
145void Cbuf_ExecuteText (int exec_when, const char *text)
146{
147 switch (exec_when)
148 {
149 case EXEC_NOW:
150 if (text && strlen(text) > 0) {
151 Com_DPrintf(S_COLOR_YELLOW "EXEC_NOW %s\n", text);
152 Cmd_ExecuteString (text);
153 } else {
154 Cbuf_Execute();
155 Com_DPrintf(S_COLOR_YELLOW "EXEC_NOW %s\n", cmd_text.data);
156 }
157 break;
158 case EXEC_INSERT:
159 Cbuf_InsertText (text);
160 break;
161 case EXEC_APPEND:
162 Cbuf_AddText (text);
163 break;
164 default:
165 Com_Error (ERR_FATAL, "Cbuf_ExecuteText: bad exec_when");
166 }
167}
168
169/*
170============

Callers 7

Com_ExecuteCfgFunction · 0.70
IN_ProcessEventsFunction · 0.50
RoQShutdownFunction · 0.50
CL_UISystemCallsFunction · 0.50
CL_FrameFunction · 0.50
UI_RunMenuScriptFunction · 0.50
UI_UpdateVideoSetupFunction · 0.50

Calls 6

Com_DPrintfFunction · 0.70
Cmd_ExecuteStringFunction · 0.70
Cbuf_ExecuteFunction · 0.70
Cbuf_InsertTextFunction · 0.70
Cbuf_AddTextFunction · 0.70
Com_ErrorFunction · 0.70

Tested by

no test coverage detected