=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: cmd: Output error messages to stderr instead of stdout where appropriate.
Alexandre Julliard
julliard at winehq.org
Mon Oct 3 17:21:24 CDT 2011
Module: wine
Branch: master
Commit: aee397a31780dcc98e555b27b4cac8f827c573d2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=aee397a31780dcc98e555b27b4cac8f827c573d2
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Sat Oct 1 04:15:05 2011 +0200
cmd: Output error messages to stderr instead of stdout where appropriate.
---
programs/cmd/builtins.c | 4 ++--
programs/cmd/wcmdmain.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index ca0d4fe..0df123a 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -1124,7 +1124,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
/* Process the input file */
if (input == INVALID_HANDLE_VALUE) {
WCMD_print_error ();
- WCMD_output (WCMD_LoadMessage(WCMD_READFAIL), item);
+ WCMD_output_stderr(WCMD_LoadMessage(WCMD_READFAIL), item);
errorlevel = 1;
return; /* FOR loop aborts at first failure here */
@@ -1539,7 +1539,7 @@ void WCMD_if (WCHAR *p, CMD_LIST **cmdList) {
WCMD_parameter(s, 1, &command, NULL);
}
else {
- WCMD_output (WCMD_LoadMessage(WCMD_SYNTAXERR));
+ WCMD_output_stderr(WCMD_LoadMessage(WCMD_SYNTAXERR));
return;
}
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 3f2cfcf..eb57928 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -1055,7 +1055,7 @@ void WCMD_run_program (WCHAR *command, int called) {
if (strchrW(param1, '.') != NULL) extensionsupplied = TRUE;
if (strlenW(param1) >= MAX_PATH)
{
- WCMD_output_asis(WCMD_LoadMessage(WCMD_LINETOOLONG));
+ WCMD_output_asis_stderr(WCMD_LoadMessage(WCMD_LINETOOLONG));
return;
}
@@ -1836,9 +1836,9 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output,
/* Handle truncated input - issue warning */
if (strlenW(extraSpace) == MAXSTRING -1) {
- WCMD_output_asis(WCMD_LoadMessage(WCMD_TRUNCATEDLINE));
- WCMD_output_asis(extraSpace);
- WCMD_output_asis(newline);
+ WCMD_output_asis_stderr(WCMD_LoadMessage(WCMD_TRUNCATEDLINE));
+ WCMD_output_asis_stderr(extraSpace);
+ WCMD_output_asis_stderr(newline);
}
/* Replace env vars if in a batch context */
More information about the wine-cvs
mailing list