Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bc176ecb
Commit
bc176ecb
authored
Dec 02, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Dec 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Print error messages on stderr, not on stdout.
parent
4b798098
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
builtins.c
programs/cmd/builtins.c
+10
-10
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+0
-1
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+3
-4
No files found.
programs/cmd/builtins.c
View file @
bc176ecb
...
...
@@ -194,7 +194,7 @@ void WCMD_clear_screen (void) {
void
WCMD_change_tty
(
void
)
{
WCMD_output
(
WCMD_LoadMessage
(
WCMD_NYI
));
WCMD_output
_stderr
(
WCMD_LoadMessage
(
WCMD_NYI
));
}
...
...
@@ -390,7 +390,7 @@ void WCMD_copy (void) {
WCHAR
ext
[
MAX_PATH
];
if
(
param1
[
0
]
==
0x00
)
{
WCMD_output
(
WCMD_LoadMessage
(
WCMD_NOARG
));
WCMD_output
_stderr
(
WCMD_LoadMessage
(
WCMD_NOARG
));
return
;
}
...
...
@@ -1135,7 +1135,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
/* Ensure line continues with variable */
if
(
!*
curPos
||
*
curPos
!=
'%'
)
{
WCMD_output
(
WCMD_LoadMessage
(
WCMD_SYNTAXERR
));
WCMD_output
_stderr
(
WCMD_LoadMessage
(
WCMD_SYNTAXERR
));
return
;
}
...
...
@@ -1154,7 +1154,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
if
(
!*
curPos
||
!
WCMD_keyword_ws_found
(
inW
,
sizeof
(
inW
)
/
sizeof
(
inW
[
0
]),
curPos
))
{
WCMD_output
(
WCMD_LoadMessage
(
WCMD_SYNTAXERR
));
WCMD_output
_stderr
(
WCMD_LoadMessage
(
WCMD_SYNTAXERR
));
return
;
}
...
...
@@ -1181,7 +1181,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
if
((
*
cmdList
==
NULL
)
||
!
WCMD_keyword_ws_found
(
doW
,
sizeof
(
doW
)
/
sizeof
(
doW
[
0
]),
(
*
cmdList
)
->
command
))
{
WCMD_output
(
WCMD_LoadMessage
(
WCMD_SYNTAXERR
));
WCMD_output
_stderr
(
WCMD_LoadMessage
(
WCMD_SYNTAXERR
));
return
;
}
...
...
@@ -2199,14 +2199,14 @@ void WCMD_setshow_date (void) {
WCMD_output
(
WCMD_LoadMessage
(
WCMD_NEWDATE
));
WCMD_ReadFile
(
GetStdHandle
(
STD_INPUT_HANDLE
),
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
),
&
count
);
if
(
count
>
2
)
{
WCMD_output
(
WCMD_LoadMessage
(
WCMD_NYI
));
WCMD_output
_stderr
(
WCMD_LoadMessage
(
WCMD_NYI
));
}
}
}
else
WCMD_print_error
();
}
else
{
WCMD_output
(
WCMD_LoadMessage
(
WCMD_NYI
));
WCMD_output
_stderr
(
WCMD_LoadMessage
(
WCMD_NYI
));
}
}
...
...
@@ -2427,14 +2427,14 @@ void WCMD_setshow_time (void) {
WCMD_output
(
WCMD_LoadMessage
(
WCMD_NEWTIME
));
WCMD_ReadFile
(
GetStdHandle
(
STD_INPUT_HANDLE
),
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
),
&
count
);
if
(
count
>
2
)
{
WCMD_output
(
WCMD_LoadMessage
(
WCMD_NYI
));
WCMD_output
_stderr
(
WCMD_LoadMessage
(
WCMD_NYI
));
}
}
}
else
WCMD_print_error
();
}
else
{
WCMD_output
(
WCMD_LoadMessage
(
WCMD_NYI
));
WCMD_output
_stderr
(
WCMD_LoadMessage
(
WCMD_NYI
));
}
}
...
...
@@ -2515,7 +2515,7 @@ void WCMD_type (WCHAR *command) {
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
h
==
INVALID_HANDLE_VALUE
)
{
WCMD_print_error
();
WCMD_output
(
WCMD_LoadMessage
(
WCMD_READFAIL
),
thisArg
);
/* should be _stderr */
WCMD_output
_stderr
(
WCMD_LoadMessage
(
WCMD_READFAIL
),
thisArg
);
errorlevel
=
1
;
}
else
{
if
(
writeHeaders
)
{
...
...
programs/cmd/tests/test_builtins.cmd
View file @
bc176ecb
...
...
@@ -141,7 +141,6 @@ if 1==1 (echo foo2>bar) else echo baz2>bar
type bar & del bar
if 1==1 (echo foo3) else echo baz3>bar
type bar || echo file does not exist, ok
echo -----
if 1==1 (echo foo4>bar) else echo baz4>bar
type bar & del bar
if 1==0 (echo foo5>bar) else echo baz5>bar
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
bc176ecb
...
...
@@ -166,8 +166,7 @@ food21
-----
foo2
foo3
@todo_wine@file does not exist, ok
@todo_wine@-----
file does not exist, ok
foo4
baz5
baz6@space@
...
...
@@ -190,8 +189,8 @@ baz
@todo_wine@foo | echo bar
@todo_wine@foo & echo bar
@todo_wine@bak &
@todo_wine@
baz@space@
@todo_wine@
0@or_broken@1
baz@space@
0@or_broken@1
@todo_wine@foo > foo
@todo_wine@<
@todo_wine@ffoof
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment