From 46a1e79f94e4bd381a28f59ebaf8d2495f8b3499 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 30 Oct 2002 18:49:44 +0000 Subject: [PATCH] added full line support Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@465 --- include/setup.h | 3 ++- src/misc/setup.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/setup.h b/include/setup.h index 865165fc..868fb1a7 100644 --- a/include/setup.h +++ b/include/setup.h @@ -30,7 +30,7 @@ public: CommandLine(int argc,char * argv[]); CommandLine(char * name,char * cmdline); const char * GetFileName(){ return file_name.c_str();} - + bool FindExist(char * name,bool remove=false); bool FindHex(char * name,int & value,bool remove=false); bool FindInt(char * name,int & value,bool remove=false); @@ -38,6 +38,7 @@ public: bool FindCommand(int which,std::string & value); bool FindStringBegin(char * begin,std::string & value, bool remove=false); int GetCount(void); + void CommandLine::GetFullLine( char * in); private: typedef std::list::iterator cmd_it; std::list cmds; diff --git a/src/misc/setup.cpp b/src/misc/setup.cpp index 8846a6c0..b4b56c43 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -369,3 +369,13 @@ CommandLine::CommandLine(char * name,char * cmdline) { } if (inword || inquote) cmds.push_back(str); } + +void CommandLine::GetFullLine(char * in) { + cmd_it it; + *in=0; + char spatie[2]={' ',0}; + for (it=cmds.begin();it!=cmds.end();it++) { + strcat(in,spatie); + strcat(in,(*it).c_str()); + } +}