This is called only by the ini parser.
| 760 | |
| 761 | // This is called only by the ini parser. |
| 762 | void 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 | |
| 780 | CCMD (alias) |
| 781 | { |
no test coverage detected