Fixed handling of "echo."

This commit is contained in:
Mike McCormack 2004-03-18 04:01:32 +00:00 committed by Alexandre Julliard
parent 838a1ea09d
commit 8d02010ff7
2 changed files with 7 additions and 10 deletions

View File

@ -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;

View File

@ -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);