Commit 8d02010f authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fixed handling of "echo."

parent 838a1ea0
......@@ -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,12 +384,7 @@ 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]);
WCMD_echo(&whichcmd[count]);
break;
case WCMD_FOR:
WCMD_for (p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment