Jason Edmeades : cmd.exe: Add support for %*.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 21 06:01:07 CST 2007
Module: wine
Branch: master
Commit: e7dc3f1a35d5ac473aff8cbc2fc5454e38be0bc9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e7dc3f1a35d5ac473aff8cbc2fc5454e38be0bc9
Author: Jason Edmeades <us at edmeades.me.uk>
Date: Tue Feb 20 18:02:29 2007 +0000
cmd.exe: Add support for %*.
---
programs/cmd/batch.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c
index ec27489..52a773b 100755
--- a/programs/cmd/batch.c
+++ b/programs/cmd/batch.c
@@ -155,6 +155,14 @@ int i;
strcpy (p, t);
strcat (p, s);
free (s);
+ } else if (*(p+1)=='*') {
+ char *startOfParms = NULL;
+ s = strdup (p+2);
+ t = WCMD_parameter (context -> command, 1, &startOfParms);
+ if (startOfParms != NULL) strcpy (p, startOfParms);
+ else *p = 0x00;
+ strcat (p, s);
+ free (s);
} else {
p++;
}
@@ -245,7 +253,8 @@ char *p;
case '\0':
return param;
default:
- if (where != NULL) *where = s;
+ /* Only return where if it is for the right parameter */
+ if (where != NULL && i==n) *where = s;
while ((*s != '\0') && (*s != ' ')) {
*p++ = *s++;
}
More information about the wine-cvs
mailing list