/* configfile.cpp * * Copyright (c) 1998, 2000, Alexander Neundorf * neundorf@kde.org * * You may distribute under the terms of the GNU General Public * License as specified in the COPYING file. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "configfile.h" #include #include #include #include #include #include #ifdef LISA_DEBUG #undef LISA_DEBUG #endif #define LISA_DEBUG 0 #ifdef dcerr #undef dcerr #endif #define dcerr if (LISA_DEBUG==1) std::cerr<<"Config::" #define CFGBUFSIZE 16*1024 Config::Config(const MyString& name/*,String path*/) { char buff[CFGBUFSIZE],c; /* String s,empty="#############################################################################################################################################################"; String home=getenv("HOME"); if (!home.empty()) home+=String("/")+name; if (fexists(home)==0) { home=path+"/"+name; if (fexists(home)==0) { home=name; if (fexists(home)==0) return; }; };*/ std::ifstream inf(name.data()); if (!inf) { std::cout<<"could not open file "<