diff --git a/include/programs.h b/include/programs.h index 868a436d..3cee7b4d 100644 --- a/include/programs.h +++ b/include/programs.h @@ -16,6 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* $Id: programs.h,v 1.15 2008-01-19 11:02:29 qbix79 Exp $ */ + #ifndef DOSBOX_PROGRAMS_H #define DOSBOX_PROGRAMS_H @@ -25,10 +27,39 @@ #ifndef DOSBOX_DOS_INC_H #include "dos_inc.h" #endif -#ifndef DOSBOX_SETUP_H -#include "setup.h" + +#ifndef CH_LIST +#define CH_LIST +#include #endif +#ifndef CH_STRING +#define CH_STRING +#include +#endif + +class CommandLine { +public: + CommandLine(int argc,char const * const argv[]); + CommandLine(char const * const name,char const * const cmdline); + const char * GetFileName(){ return file_name.c_str();} + + bool FindExist(char const * const name,bool remove=false); + bool FindHex(char const * const name,int & value,bool remove=false); + bool FindInt(char const * const name,int & value,bool remove=false); + bool FindString(char const * const name,std::string & value,bool remove=false); + bool FindCommand(unsigned int which,std::string & value); + bool FindStringBegin(char const * const begin,std::string & value, bool remove=false); + bool FindStringRemain(char const * const name,std::string & value); + bool GetStringRemain(std::string & value); + unsigned int GetCount(void); + void Shift(unsigned int amount=1); +private: + typedef std::list::iterator cmd_it; + std::list cmds; + std::string file_name; + bool FindEntry(char const * const name,cmd_it & it,bool neednext=false); +}; class Program { public: diff --git a/include/setup.h b/include/setup.h index ad50ddfc..5c406e04 100644 --- a/include/setup.h +++ b/include/setup.h @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: setup.h,v 1.28 2007-10-21 08:43:24 qbix79 Exp $ */ +/* $Id: setup.h,v 1.29 2008-01-19 11:02:29 qbix79 Exp $ */ #ifndef DOSBOX_SETUP_H #define DOSBOX_SETUP_H @@ -28,31 +28,19 @@ #ifndef DOSBOX_CROSS_H #include "cross.h" #endif -#include +#ifndef DOSBOX_PROGRAMS_H +#include "programs.h" +#endif + +#ifndef CH_LIST +#define CH_LIST #include +#endif -class CommandLine { -public: - CommandLine(int argc,char const * const argv[]); - CommandLine(char const * const name,char const * const cmdline); - const char * GetFileName(){ return file_name.c_str();} - - bool FindExist(char const * const name,bool remove=false); - bool FindHex(char const * const name,int & value,bool remove=false); - bool FindInt(char const * const name,int & value,bool remove=false); - bool FindString(char const * const name,std::string & value,bool remove=false); - bool FindCommand(unsigned int which,std::string & value); - bool FindStringBegin(char const * const begin,std::string & value, bool remove=false); - bool FindStringRemain(char const * const name,std::string & value); - bool GetStringRemain(std::string & value); - unsigned int GetCount(void); - void Shift(unsigned int amount=1); -private: - typedef std::list::iterator cmd_it; - std::list cmds; - std::string file_name; - bool FindEntry(char const * const name,cmd_it & it,bool neednext=false); -}; +#ifndef CH_STRING +#define CH_STRING +#include +#endif union Value{ int _hex; diff --git a/src/dos/dos_programs.cpp b/src/dos/dos_programs.cpp index e9c90a1a..60c6cd33 100644 --- a/src/dos/dos_programs.cpp +++ b/src/dos/dos_programs.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos_programs.cpp,v 1.81 2007-12-27 15:38:00 qbix79 Exp $ */ +/* $Id: dos_programs.cpp,v 1.82 2008-01-19 11:02:29 qbix79 Exp $ */ #include "dosbox.h" #include @@ -34,6 +34,7 @@ #include "dos_system.h" #include "dos_inc.h" #include "bios.h" +#include "setup.h" #if defined HAVE_SYS_TYPES_H && defined HAVE_PWD_H #include diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index 3c1a3f48..4b3a1307 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_cmds.cpp,v 1.79 2007-10-16 07:29:22 qbix79 Exp $ */ +/* $Id: shell_cmds.cpp,v 1.80 2008-01-19 11:02:29 qbix79 Exp $ */ #include "dosbox.h" #include "shell.h" @@ -24,6 +24,7 @@ #include "regs.h" #include "../dos/drives.h" #include "support.h" +#include "setup.h" #include #include #include