From 22cb26c2985fd46f26fcec1f2158c1b9bb5b9ea5 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 25 Mar 2005 09:46:53 +0000 Subject: [PATCH] New include system. Added an autoexecobject which manages the lines in autoexec.bat Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2154 --- include/shell.h | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/include/shell.h b/include/shell.h index 5bfe3e41..04ca98cc 100644 --- a/include/shell.h +++ b/include/shell.h @@ -16,22 +16,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell.h,v 1.10 2005-02-10 10:20:47 qbix79 Exp $ */ - -#ifndef SHELL_H_ -#define SHELL_H_ +/* $Id: shell.h,v 1.11 2005-03-25 09:46:53 qbix79 Exp $ */ +#ifndef DOSBOX_SHELL_H +#define DOSBOX_SHELL_H #include -#include +#ifndef DOSBOX_DOSBOX_H #include "dosbox.h" -#include "mem.h" +#endif +#ifndef DOSBOX_PROGRAMS_H #include "programs.h" -#include "dos_inc.h" -#include "regs.h" -#include "support.h" -#include "callback.h" -#include "setup.h" +#endif #include #include @@ -144,4 +140,17 @@ static inline char* ExpandDot(char*args, char* buffer) { return buffer; } +/* Object to manage lines in the autoexec.bat The lines get removed from + * the file if the object gets destroyed. The environment is updated + * as well if the line set a a variable */ +class AutoexecObject{ +private: + bool installed; + char buf[256]; +public: + AutoexecObject():installed(false){}; + void Install(char * line,...); + ~AutoexecObject(); +}; + #endif