Module: wine Branch: master Commit: 929a92f3c4808d36ce8e381e1dc4e2cb9a304952 URL: http://source.winehq.org/git/wine.git/?a=commit;h=929a92f3c4808d36ce8e381e1d...
Author: Jason Edmeades jason.edmeades@googlemail.com Date: Fri Jun 15 20:59:22 2007 +0100
cmd.exe: GOTO throws away any preloaded multi part/line command.
---
programs/cmd/batch.c | 2 +- programs/cmd/builtins.c | 5 ++++- programs/cmd/wcmd.h | 2 +- programs/cmd/wcmdmain.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c index b2a07cb..cc9d835 100644 --- a/programs/cmd/batch.c +++ b/programs/cmd/batch.c @@ -97,7 +97,7 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN /* If processing a call :label, 'goto' the label in question */ if (startLabel) { strcpyW(param1, startLabel); - WCMD_goto(); + WCMD_goto(NULL); }
/* diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 665a043..6901cd3 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -686,10 +686,13 @@ void WCMD_give_help (WCHAR *command) { * FIXME: DOS is supposed to allow labels with spaces - we don't. */
-void WCMD_goto (void) { +void WCMD_goto (CMD_LIST **cmdList) {
WCHAR string[MAX_PATH];
+ /* Do not process any more parts of a processed multipart or multilines command */ + *cmdList = NULL; + if (param1[0] == 0x00) { WCMD_output (WCMD_LoadMessage(WCMD_NOARG)); return; diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index b6258e5..c1af0bd 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -53,7 +53,7 @@ void WCMD_enter_paged_mode(const WCHAR *); void WCMD_exit (void); void WCMD_for (WCHAR *, CMD_LIST **cmdList); void WCMD_give_help (WCHAR *command); -void WCMD_goto (void); +void WCMD_goto (CMD_LIST **cmdList); void WCMD_if (WCHAR *, CMD_LIST **cmdList); void WCMD_leave_paged_mode(void); void WCMD_more (WCHAR *); diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index fdb8089..30c1921 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -712,7 +712,7 @@ void WCMD_process_command (WCHAR *command, CMD_LIST **cmdList) WCMD_for (p, cmdList); break; case WCMD_GOTO: - WCMD_goto (); + WCMD_goto (cmdList); break; case WCMD_HELP: WCMD_give_help (p);