X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fsubsys%2Fsystem%2Fcmd%2Fcmd.c;h=bc7c05efc54c980657cb3070864f9aa2f16297e3;hp=59878c2111aaa7c74f7f4d728015079fcb3d6054;hb=a5ad40f6c0e9d8a4e05c26d5a4af9e69a09bac95;hpb=8bbbecaa8773ae4fefbd1687457a0b455807b22e diff --git a/reactos/subsys/system/cmd/cmd.c b/reactos/subsys/system/cmd/cmd.c index 59878c2111a..bc7c05efc54 100644 --- a/reactos/subsys/system/cmd/cmd.c +++ b/reactos/subsys/system/cmd/cmd.c @@ -1282,6 +1282,7 @@ ProcessInput (BOOL bFlag) LPCTSTR tmp; BOOL bEchoThisLine; BOOL bModeSetA; + BOOL bIsBatch; do { @@ -1294,7 +1295,12 @@ ProcessInput (BOOL bFlag) ReadCommand (readline, CMDLINE_LENGTH); ip = readline; bEchoThisLine = FALSE; + bIsBatch = FALSE; } + else + { + bIsBatch = TRUE; + } /* skip leading blanks */ while ( _istspace(*ip) ) @@ -1403,7 +1409,7 @@ ProcessInput (BOOL bFlag) if (*commandline) { ParseCommandLine (commandline); - if (bEcho && !bIgnoreEcho) + if (bEcho && !bIgnoreEcho && (!bIsBatch || bEchoThisLine)) ConOutChar ('\n'); bIgnoreEcho = FALSE; }