From bd02cf869e21749ab709fdb61cb15ec0e4922297 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Thu, 19 Feb 2004 12:00:38 +0000 Subject: [PATCH] fixed batchfile handling as startup argument Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1683 --- ChangeLog | 5 +++++ src/shell/shell.cpp | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a01db8e8..b1c06c19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +0.62 + - Fixed commandline parsing when .bat files involved (fixes -exit) + - Fixed issues with tabs in commandline not being processed correctly + - Returned filename in ds:dx in create-random-file (c2woody) + 0.61 - Added a beta dynamic cpu for x86 hosts (very unstable) - Added opengl and hardware overlay display output diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 2688a1d2..fdf828fd 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell.cpp,v 1.39 2004-02-03 08:35:29 qbix79 Exp $ */ +/* $Id: shell.cpp,v 1.40 2004-02-19 12:00:38 qbix79 Exp $ */ #include #include @@ -244,7 +244,15 @@ void AUTOEXEC_Init(Section * sec) { if (access(buffer,F_OK)) goto nomount; SHELL_AddAutoexec("MOUNT C \"%s\"",buffer); SHELL_AddAutoexec("C:"); - SHELL_AddAutoexec(name); + upcase(name); + if(strstr(name,".BAT")==0) { + SHELL_AddAutoexec(name); + } else { + char call[CROSS_LEN] = { 0 }; + strcpy(call,"CALL "); + strcat(call,name); + SHELL_AddAutoexec(call); + } if(addexit) SHELL_AddAutoexec("exit"); } }