Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
84f02a6a
Commit
84f02a6a
authored
Mar 03, 2008
by
Jason Edmeades
Committed by
Alexandre Julliard
Mar 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Fix pipes.
parent
52e8f6f6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
builtins.c
programs/cmd/builtins.c
+8
-4
wcmd.h
programs/cmd/wcmd.h
+9
-2
wcmdmain.c
programs/cmd/wcmdmain.c
+0
-0
No files found.
programs/cmd/builtins.c
View file @
84f02a6a
...
...
@@ -998,13 +998,15 @@ void WCMD_part_execute(CMD_LIST **cmdList, WCHAR *firstcmd, WCHAR *variable,
/* execute all appropriate commands */
curPosition
=
*
cmdList
;
WINE_TRACE
(
"Processing cmdList(%p) -
&
(%d) bd(%d / %d)
\n
"
,
WINE_TRACE
(
"Processing cmdList(%p) -
delim
(%d) bd(%d / %d)
\n
"
,
*
cmdList
,
(
*
cmdList
)
->
isAmphersand
,
(
*
cmdList
)
->
prevDelim
,
(
*
cmdList
)
->
bracketDepth
,
myDepth
);
/* Execute any appended to the statement with &&'s */
if
((
*
cmdList
)
->
isAmphersand
)
{
/* Execute any statements appended to the line */
/* FIXME: Only if previous call worked for && or failed for || */
if
((
*
cmdList
)
->
prevDelim
==
CMD_ONFAILURE
||
(
*
cmdList
)
->
prevDelim
!=
CMD_ONSUCCESS
)
{
if
(
processThese
)
{
WCMD_execute
((
*
cmdList
)
->
command
,
(
*
cmdList
)
->
redirects
,
variable
,
value
,
cmdList
);
...
...
@@ -2278,6 +2280,7 @@ void WCMD_more (WCHAR *command) {
HANDLE
hConIn
=
CreateFile
(
conInW
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
0
);
WINE_TRACE
(
"No parms - working probably in pipe mode
\n
"
);
SetStdHandle
(
STD_INPUT_HANDLE
,
hConIn
);
/* Warning: No easy way of ending the stream (ctrl+z on windows) so
...
...
@@ -2302,6 +2305,7 @@ void WCMD_more (WCHAR *command) {
BOOL
needsPause
=
FALSE
;
/* Loop through all args */
WINE_TRACE
(
"Parms supplied - working through each file
\n
"
);
WCMD_enter_paged_mode
(
moreStrPage
);
while
(
argN
)
{
...
...
programs/cmd/wcmd.h
View file @
84f02a6a
...
...
@@ -31,12 +31,20 @@
/* Data structure to hold commands to be processed */
typedef
enum
_CMDdelimiters
{
CMD_NONE
,
/* End of line or single & */
CMD_ONFAILURE
,
/* || */
CMD_ONSUCCESS
,
/* && */
CMD_PIPE
/* Single */
}
CMD_DELIMITERS
;
typedef
struct
_CMD_LIST
{
WCHAR
*
command
;
/* Command string to execute */
WCHAR
*
redirects
;
/* Redirects in place */
struct
_CMD_LIST
*
nextcommand
;
/* Next command string to execute */
BOOL
isAmphersand
;
/* Whether follows &&
*/
CMD_DELIMITERS
prevDelim
;
/* Previous delimiter
*/
int
bracketDepth
;
/* How deep bracketing have we got to */
WCHAR
pipeFile
[
MAX_PATH
];
/* Where to get input from for pipes */
}
CMD_LIST
;
void
WCMD_assoc
(
WCHAR
*
,
BOOL
);
...
...
@@ -64,7 +72,6 @@ void WCMD_output (const WCHAR *format, ...);
void
WCMD_output_asis
(
const
WCHAR
*
message
);
void
WCMD_parse
(
WCHAR
*
s
,
WCHAR
*
q
,
WCHAR
*
p1
,
WCHAR
*
p2
);
void
WCMD_pause
(
void
);
void
WCMD_pipe
(
CMD_LIST
**
command
,
WCHAR
*
var
,
WCHAR
*
val
);
void
WCMD_popd
(
void
);
void
WCMD_print_error
(
void
);
void
WCMD_pushd
(
WCHAR
*
);
...
...
programs/cmd/wcmdmain.c
View file @
84f02a6a
This diff is collapsed.
Click to expand it.
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