diff --git a/Gtkmm3/cfgfile2/cfgfile.cc b/Gtkmm3/cfgfile2/cfgfile.cc deleted file mode 100644 index 58ba11b..0000000 --- a/Gtkmm3/cfgfile2/cfgfile.cc +++ /dev/null @@ -1,154 +0,0 @@ -// A Test to read Config files -// This is a modified version -// The Config File Should be a text file -// and the content as follows -// key=value - -#include "cfgfile.hh" - -static void Trim(std::string &str){ - if(str.empty()){//String is empty - return; - } - - size_t i,start_pos,end_pos; - - for(i=0;i=0;i--){//Get End Position - if(!isspace(str[i])){ - break; - } - } - - end_pos=i; - - str=str.substr(start_pos,end_pos+1); -} - -bool readCfgFile(std::string &cfgfilePath,conf_map &configs){ - //Open The Config File and load config to map - std::fstream cfgfile; - cfgfile.open(cfgfilePath); - if(!cfgfile.is_open()){ - std::cout<<"Failed to open the file!"<