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
30fcdd9f
Commit
30fcdd9f
authored
Mar 29, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Mar 30, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xcopy: Add support for COPYCMD override and fix /-y.
parent
70fe414c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
xcopy.c
programs/xcopy/xcopy.c
+17
-1
No files found.
programs/xcopy/xcopy.c
View file @
30fcdd9f
...
...
@@ -50,6 +50,8 @@
#define OPT_NOCOPY 0x00000080
#define OPT_NOPROMPT 0x00000100
#define MAXSTRING 8192
WINE_DEFAULT_DEBUG_CHANNEL
(
xcopy
);
/* Prototypes */
...
...
@@ -91,8 +93,13 @@ int main (int argc, char *argv[])
WCHAR
sourcespec
[
MAX_PATH
]
=
{
0
};
/* Filespec of source */
WCHAR
destinationstem
[
MAX_PATH
]
=
{
0
};
/* Stem of destination */
WCHAR
destinationspec
[
MAX_PATH
]
=
{
0
};
/* Filespec of destination */
WCHAR
copyCmd
[
MAXSTRING
];
/* COPYCMD env var */
DWORD
flags
=
0
;
/* Option flags */
LPWSTR
*
argvW
=
NULL
;
const
WCHAR
PROMPTSTR1
[]
=
{
'/'
,
'Y'
,
0
};
const
WCHAR
PROMPTSTR2
[]
=
{
'/'
,
'y'
,
0
};
const
WCHAR
COPYCMD
[]
=
{
'C'
,
'O'
,
'P'
,
'Y'
,
'C'
,
'M'
,
'D'
,
0
};
/*
* Parse the command line
*/
...
...
@@ -106,6 +113,14 @@ int main (int argc, char *argv[])
return
RC_INITERROR
;
}
/* Preinitialize flags based on COPYCMD */
if
(
GetEnvironmentVariable
(
COPYCMD
,
copyCmd
,
MAXSTRING
))
{
if
(
wcsstr
(
copyCmd
,
PROMPTSTR1
)
!=
NULL
||
wcsstr
(
copyCmd
,
PROMPTSTR2
)
!=
NULL
)
{
flags
|=
OPT_NOPROMPT
;
}
}
/* Skip first arg, which is the program name */
argvW
++
;
...
...
@@ -136,7 +151,8 @@ int main (int argc, char *argv[])
case
'W'
:
flags
|=
OPT_PAUSE
;
break
;
case
'T'
:
flags
|=
OPT_NOCOPY
|
OPT_RECURSIVE
;
break
;
case
'Y'
:
flags
|=
OPT_NOPROMPT
;
break
;
case
'-'
:
if
(
argvW
[
0
][
2
]
==
'Y'
)
flags
&=
~
OPT_NOPROMPT
;
break
;
case
'-'
:
if
(
toupper
(
argvW
[
0
][
2
])
==
'Y'
)
flags
&=
~
OPT_NOPROMPT
;
break
;
default:
WINE_FIXME
(
"Unhandled parameter '%s'
\n
"
,
wine_dbgstr_w
(
*
argvW
));
}
...
...
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