mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-12 09:57:05 +03:00
939f824d96
git-svn-id: svn://kolibrios.org@959 a494cfbc-eb01-0410-851d-a64ba20cac60
32 lines
561 B
C
32 lines
561 B
C
|
|
int cmd_help(char cmd[])
|
|
{
|
|
|
|
int i;
|
|
|
|
char available[]={" %d commands available:\n\r"};
|
|
|
|
if (NULL == cmd)
|
|
{
|
|
printf (available, NUM_OF_CMD);
|
|
for (i = 0; i < NUM_OF_CMD; i++)
|
|
printf(" %s\n\r", HELP_COMMANDS[i]);
|
|
}
|
|
else
|
|
{
|
|
for (i=0; i<NUM_OF_CMD; i++)
|
|
if ( !strcmp(cmd, HELP_COMMANDS[i]) )
|
|
{
|
|
printf(HELP_DESC[i]);
|
|
return TRUE;
|
|
}
|
|
|
|
printf (" Command \'%s\' not found.\n\r", cmd);
|
|
printf (available, NUM_OF_CMD);
|
|
for (i = 0; i < NUM_OF_CMD; i++)
|
|
printf(" %s\n\r", HELP_COMMANDS[i]);
|
|
}
|
|
|
|
return FALSE;
|
|
}
|