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

Function C_SetAlias

source/common/console/c_dispatch.cpp:762–778  ·  view source on GitHub ↗

This is called only by the ini parser.

Source from the content-addressed store, hash-verified

760
761// This is called only by the ini parser.
762void C_SetAlias (const char *name, const char *cmd)
763{
764 FConsoleCommand *prev, *alias, **chain;
765
766 chain = &Commands[MakeKey (name) % FConsoleCommand::HASH_SIZE];
767 alias = ScanChainForName (*chain, name, strlen (name), &prev);
768 if (alias != NULL)
769 {
770 if (!alias->IsAlias ())
771 {
772 //Printf (PRINT_BOLD, "%s is a command and cannot be an alias.\n", name);
773 return;
774 }
775 delete alias;
776 }
777 new FConsoleAlias (name, cmd, false);
778}
779
780CCMD (alias)
781{

Callers 1

DoGameSetupMethod · 0.85

Calls 2

ScanChainForNameFunction · 0.85
IsAliasMethod · 0.80

Tested by

no test coverage detected