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()); + } +}