Fixed handling of "echo."
This commit is contained in:
parent
838a1ea09d
commit
8d02010ff7
|
@ -212,16 +212,18 @@ void WCMD_echo (const char *command) {
|
|||
static const char *eon = "Echo is ON\n", *eoff = "Echo is OFF\n";
|
||||
int count;
|
||||
|
||||
if ((command[0] == '.') && (command[1] == 0)) {
|
||||
WCMD_output (newline);
|
||||
return;
|
||||
}
|
||||
if (command[0]==' ')
|
||||
command++;
|
||||
count = strlen(command);
|
||||
if (count == 0) {
|
||||
if (echo_mode) WCMD_output (eon);
|
||||
else WCMD_output (eoff);
|
||||
return;
|
||||
}
|
||||
if ((count == 1) && (command[0] == '.')) {
|
||||
WCMD_output (newline);
|
||||
return;
|
||||
}
|
||||
if (lstrcmpi(command, "ON") == 0) {
|
||||
echo_mode = 1;
|
||||
return;
|
||||
|
|
|
@ -384,11 +384,6 @@ void WCMD_process_command (char *command)
|
|||
WCMD_directory ();
|
||||
break;
|
||||
case WCMD_ECHO:
|
||||
/* Use the unstripped version of the following data - step over the space */
|
||||
/* but only if a parameter follows */
|
||||
if (strlen(&whichcmd[count]) > 0)
|
||||
WCMD_echo(&whichcmd[count+1]);
|
||||
else
|
||||
WCMD_echo(&whichcmd[count]);
|
||||
break;
|
||||
case WCMD_FOR:
|
||||
|
|
Loading…
Reference in New Issue