diff --git a/include/setup.h b/include/setup.h index 868fb1a7..248acf7c 100644 --- a/include/setup.h +++ b/include/setup.h @@ -37,8 +37,8 @@ public: bool FindString(char * name,std::string & value,bool remove=false); bool FindCommand(int which,std::string & value); bool FindStringBegin(char * begin,std::string & value, bool remove=false); + bool FindStringRemain(char * name,std::string & value); 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 b4b56c43..fd69e7c8 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -325,6 +325,18 @@ bool CommandLine::FindStringBegin(char * begin,std::string & value, bool remove) return false; } +bool CommandLine::FindStringRemain(char * name,std::string & value) { + cmd_it it;value=""; + if (!FindEntry(name,it)) return false; + it++; + for (;it!=cmds.end();it++) { + value+=" "; + value+=(*it); + } + return true; +} + + int CommandLine::GetCount(void) { return cmds.size(); } @@ -370,12 +382,3 @@ 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()); - } -}