Jason Edmeades : xcopy: Add support for /W (pause).
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Mar 30 06:20:16 CDT 2007
Module: wine
Branch: master
Commit: cf872445a3c4f8d9112851b3999bfc134923f160
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cf872445a3c4f8d9112851b3999bfc134923f160
Author: Jason Edmeades <us at edmeades.me.uk>
Date: Thu Mar 29 22:20:59 2007 +0100
xcopy: Add support for /W (pause).
---
programs/xcopy/xcopy.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/programs/xcopy/xcopy.c b/programs/xcopy/xcopy.c
index 718923e..848fe0d 100644
--- a/programs/xcopy/xcopy.c
+++ b/programs/xcopy/xcopy.c
@@ -46,6 +46,7 @@
#define OPT_QUIET 0x00000008
#define OPT_FULL 0x00000010
#define OPT_SIMULATE 0x00000020
+#define OPT_PAUSE 0x00000040
WINE_DEFAULT_DEBUG_CHANNEL(xcopy);
@@ -130,6 +131,7 @@ int main (int argc, char *argv[])
case 'Q': flags |= OPT_QUIET; break;
case 'F': flags |= OPT_FULL; break;
case 'L': flags |= OPT_SIMULATE; break;
+ case 'W': flags |= OPT_PAUSE; break;
default:
WINE_FIXME("Unhandled parameter '%s'\n", wine_dbgstr_w(*argvW));
}
@@ -160,6 +162,16 @@ int main (int argc, char *argv[])
WINE_TRACE("Dest Stem : '%s'\n", wine_dbgstr_w(destinationstem));
WINE_TRACE("Dest Spec : '%s'\n", wine_dbgstr_w(destinationspec));
+ /* Pause if necessary */
+ if (flags & OPT_PAUSE) {
+ DWORD count;
+ char pausestr[10];
+
+ printf("Press <enter> to begin copying\n");
+ ReadFile (GetStdHandle(STD_INPUT_HANDLE), pausestr, sizeof(pausestr),
+ &count, NULL);
+ }
+
/* Now do the hard work... */
rc = XCOPY_DoCopy(sourcestem, sourcespec,
destinationstem, destinationspec,
More information about the wine-cvs
mailing list