Added Cmd_CmdList_f()

This commit is contained in:
Anton E. Gavrilov 2000-04-03 10:05:48 +00:00
parent 895e900556
commit 68a2e7e74c
1 changed files with 16 additions and 2 deletions

View File

@ -725,7 +725,7 @@ A complete command line has been parsed, so try to execute it
FIXME: lookupnoadd the token to speed search?
============
*/
void Cmd_ExecuteString (char *text, cmd_source_t src)
void Cmd_ExecuteString (char *text, cmd_source_t src)
{
cmd_function_t *cmd;
cmdalias_t *a;
@ -793,6 +793,19 @@ int Cmd_CheckParm (char *parm)
return 0;
}
void Cmd_CmdList_f (void)
{
cmd_function_t *cmd;
int i;
for (cmd=cmd_functions, i=0 ; cmd ; cmd=cmd->next, i++)
{
Con_Printf("%s\n", cmd->name);
}
Con_Printf ("%d commands\n", i);
}
/*
============
Cmd_Init
@ -807,8 +820,9 @@ void Cmd_Init (void)
Cmd_AddCommand ("exec",Cmd_Exec_f);
Cmd_AddCommand ("echo",Cmd_Echo_f);
Cmd_AddCommand ("alias",Cmd_Alias_f);
Cmd_AddCommand ("unalias",Cmd_UnAlias_f); // Tonik
Cmd_AddCommand ("unalias",Cmd_UnAlias_f);
Cmd_AddCommand ("wait", Cmd_Wait_f);
Cmd_AddCommand ("cmdlist", Cmd_CmdList_f);
#ifndef SERVERONLY
Cmd_AddCommand ("cmd", Cmd_ForwardToServer_f);
#endif