4b4d896f8a
git-svn-id: svn://kolibrios.org@1668 a494cfbc-eb01-0410-851d-a64ba20cac60
41 lines
775 B
C
41 lines
775 B
C
|
|
int cmd_help(char cmd[])
|
|
{
|
|
|
|
int i;
|
|
|
|
#if LANG_ENG
|
|
char available[]={" %d commands available:\n\r"};
|
|
#elif LANG_RUS
|
|
char available[]={" Š®«-¢® ¤®áâã¯ëå ª®¬ ¤: %d\n\r"};
|
|
#endif
|
|
|
|
if ( !strlen(cmd) )
|
|
{
|
|
printf (available, NUM_OF_CMD);
|
|
for (i = 0; i < NUM_OF_CMD; i++)
|
|
printf(" %s\n\r", COMMANDS[i].name);
|
|
return TRUE;
|
|
}
|
|
else
|
|
{
|
|
for (i=0; i<NUM_OF_CMD; i++)
|
|
if ( !strcmp(cmd, COMMANDS[i].name) )
|
|
{
|
|
printf(COMMANDS[i].help);
|
|
return TRUE;
|
|
}
|
|
|
|
#if LANG_ENG
|
|
printf (" Command \'%s\' not found.\n\r", cmd);
|
|
#elif LANG_RUS
|
|
printf (" Š®¬ ¤ \'%s\' ¥ ©¤¥ .\n\r", cmd);
|
|
#endif
|
|
printf (available, NUM_OF_CMD);
|
|
for (i = 0; i < NUM_OF_CMD; i++)
|
|
printf(" %s\n\r", COMMANDS[i].name);
|
|
}
|
|
|
|
return FALSE;
|
|
}
|