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
b129a148
Commit
b129a148
authored
Sep 11, 2003
by
Ferenc Wagner
Committed by
Alexandre Julliard
Sep 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement >> style (append) output redirection.
parent
643b7c97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
wcmdmain.c
programs/wcmd/wcmdmain.c
+14
-3
No files found.
programs/wcmd/wcmdmain.c
View file @
b129a148
...
...
@@ -258,7 +258,7 @@ void WCMD_process_command (char *command)
{
char
*
cmd
,
*
p
;
int
status
,
i
,
len
;
DWORD
count
;
DWORD
count
,
creationDisposition
;
HANDLE
old_stdin
=
0
,
old_stdout
=
0
,
h
;
char
*
whichcmd
;
SECURITY_ATTRIBUTES
sa
;
...
...
@@ -307,16 +307,27 @@ void WCMD_process_command (char *command)
SetStdHandle
(
STD_INPUT_HANDLE
,
h
);
}
if
((
p
=
strchr
(
cmd
,
'>'
))
!=
NULL
)
{
h
=
CreateFile
(
WCMD_parameter
(
++
p
,
0
,
NULL
),
GENERIC_WRITE
,
0
,
&
sa
,
CREATE_ALWAYS
,
*
p
++
=
'\0'
;
if
(
'>'
==
*
p
)
{
creationDisposition
=
OPEN_ALWAYS
;
p
++
;
}
else
{
creationDisposition
=
CREATE_ALWAYS
;
}
h
=
CreateFile
(
WCMD_parameter
(
p
,
0
,
NULL
),
GENERIC_WRITE
,
0
,
&
sa
,
creationDisposition
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
h
==
INVALID_HANDLE_VALUE
)
{
WCMD_print_error
();
HeapFree
(
GetProcessHeap
(),
0
,
cmd
);
return
;
}
if
(
SetFilePointer
(
h
,
0
,
NULL
,
FILE_END
)
==
INVALID_SET_FILE_POINTER
)
{
WCMD_print_error
();
}
old_stdout
=
GetStdHandle
(
STD_OUTPUT_HANDLE
);
SetStdHandle
(
STD_OUTPUT_HANDLE
,
h
);
*--
p
=
'\0'
;
}
if
((
p
=
strchr
(
cmd
,
'<'
))
!=
NULL
)
*
p
=
'\0'
;
...
...
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