MCPcopy Create free account
hub / github.com/ZDoom/Raze / AddCommand

Method AddCommand

source/common/console/c_dispatch.cpp:973–996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

971}
972
973void FExecList::AddCommand(const char *cmd, const char *file)
974{
975 // Pullins are special and need to be separated from general commands.
976 // They also turned out to be a really bad idea, since they make things
977 // more complicated. :(
978 if (file != NULL && strnicmp(cmd, "pullin", 6) == 0 && isspace(cmd[6]))
979 {
980 FCommandLine line(cmd);
981 C_SearchForPullins(this, file, line);
982 }
983 // Recursive exec: Parse this file now.
984 else if (strnicmp(cmd, "exec", 4) == 0 && isspace(cmd[4]))
985 {
986 FCommandLine argv(cmd);
987 for (int i = 1; i < argv.argc(); ++i)
988 {
989 C_ParseExecFile(argv[i], this);
990 }
991 }
992 else
993 {
994 Commands.Push(cmd);
995 }
996}
997
998void FExecList::ExecCommands() const
999{

Callers 4

C_DoCommandFunction · 0.45
AddCommandStringFunction · 0.45
C_ParseCmdLineParamsFunction · 0.45
C_ParseExecFileFunction · 0.45

Calls 4

C_SearchForPullinsFunction · 0.85
C_ParseExecFileFunction · 0.85
argcMethod · 0.80
PushMethod · 0.45

Tested by

no test coverage detected