Module: wine Branch: master Commit: d2474dece3f242120b694594e55f30bc5cd433e5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d2474dece3f242120b694594e5...
Author: Jason Edmeades jason.edmeades@googlemail.com Date: Fri Jun 15 20:59:24 2007 +0100
cmd.exe: EXIT /b skips any residual commands.
---
programs/cmd/builtins.c | 3 ++- programs/cmd/wcmd.h | 2 +- programs/cmd/wcmdmain.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 6901cd3..ebbef1b 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2053,7 +2053,7 @@ int WCMD_volume (int mode, WCHAR *path) { * */
-void WCMD_exit (void) { +void WCMD_exit (CMD_LIST **cmdList) {
static const WCHAR parmB[] = {'/','B','\0'}; int rc = atoiW(param1); /* Note: atoi of empty parameter is 0 */ @@ -2061,6 +2061,7 @@ void WCMD_exit (void) { if (context && lstrcmpiW(quals, parmB) == 0) { errorlevel = rc; context -> skip_rest = TRUE; + *cmdList = NULL; } else { ExitProcess(rc); } diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index c1af0bd..ebb0fde 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -50,7 +50,7 @@ void WCMD_directory (WCHAR *); void WCMD_echo (const WCHAR *); void WCMD_endlocal (void); void WCMD_enter_paged_mode(const WCHAR *); -void WCMD_exit (void); +void WCMD_exit (CMD_LIST **cmdList); void WCMD_for (WCHAR *, CMD_LIST **cmdList); void WCMD_give_help (WCHAR *command); void WCMD_goto (CMD_LIST **cmdList); diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 1addd55..a690cb0 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -799,7 +799,7 @@ void WCMD_process_command (WCHAR *command, CMD_LIST **cmdList) WCMD_more(p); break; case WCMD_EXIT: - WCMD_exit (); + WCMD_exit (cmdList); break; default: WCMD_run_program (whichcmd, 0);