--- trunk/OOPSE-2.0/src/openbabel/data.cpp 2005/11/16 19:42:11 2440 +++ trunk/OOPSE-2.0/src/openbabel/data.cpp 2005/12/16 21:52:50 2518 @@ -21,7 +21,7 @@ GNU General Public License for more details. #pragma warning (disable : 4786) #endif -#include "babelconfig.hpp" +#include "config.h" #include "data.hpp" #include "mol.hpp" @@ -79,8 +79,8 @@ OBElementTable::OBElementTable() OBElementTable::OBElementTable() { _init = false; - _dir = BABEL_DATADIR; - _envvar = "BABEL_DATADIR"; + STR_DEFINE(_dir, FRC_PATH); + _envvar = "FORCE_PARAM_PATH"; _filename = "element.txt"; _subdir = "data"; _dataptr = ElementData; @@ -331,8 +331,8 @@ OBIsotopeTable::OBIsotopeTable() OBIsotopeTable::OBIsotopeTable() { _init = false; - _dir = BABEL_DATADIR; - _envvar = "BABEL_DATADIR"; + STR_DEFINE(_dir, FRC_PATH); + _envvar = "FORCE_PARAM_PATH"; _filename = "isotope.txt"; _subdir = "data"; _dataptr = IsotopeData; @@ -362,7 +362,7 @@ void OBIsotopeTable::ParseLine(const char *buffer) _isotopes.push_back(row); } else - obErrorLog.ThrowError(__FUNCTION__, " Could not parse line in isotope table isotope.txt", obInfo); + obErrorLog.ThrowError(__func__, " Could not parse line in isotope table isotope.txt", obInfo); } } @@ -435,8 +435,8 @@ OBTypeTable::OBTypeTable() OBTypeTable::OBTypeTable() { _init = false; - _dir = BABEL_DATADIR; - _envvar = "BABEL_DATADIR"; + STR_DEFINE(_dir, FRC_PATH); + _envvar = "FORCE_PARAM_PATH"; _filename = "types.txt"; _subdir = "data"; _dataptr = TypesData; @@ -464,7 +464,7 @@ void OBTypeTable::ParseLine(const char *buffer) stringstream errorMsg; errorMsg << " Could not parse line in type translation table types.txt -- incorect number of columns"; errorMsg << " found " << vc.size() << " expected " << _ncols << "."; - obErrorLog.ThrowError(__FUNCTION__, errorMsg.str(), obInfo); + obErrorLog.ThrowError(__func__, errorMsg.str(), obInfo); } } _linecount++; @@ -485,7 +485,7 @@ bool OBTypeTable::SetFromType(const char* from) return(true); } - obErrorLog.ThrowError(__FUNCTION__, "Requested type column not found", obInfo); + obErrorLog.ThrowError(__func__, "Requested type column not found", obInfo); return(false); } @@ -505,7 +505,7 @@ bool OBTypeTable::SetToType(const char* to) return(true); } - obErrorLog.ThrowError(__FUNCTION__, "Requested type column not found", obInfo); + obErrorLog.ThrowError(__func__, "Requested type column not found", obInfo); return(false); } @@ -545,7 +545,7 @@ bool OBTypeTable::Translate(string &to, const string & } // Throw an error, copy the string and return false - obErrorLog.ThrowError(__FUNCTION__, "Cannot perform atom type translation: table cannot find requested types.", obWarning); + obErrorLog.ThrowError(__func__, "Cannot perform atom type translation: table cannot find requested types.", obWarning); to = from; return(false); } @@ -590,8 +590,8 @@ OBResidueData::OBResidueData() OBResidueData::OBResidueData() { _init = false; - _dir = BABEL_DATADIR; - _envvar = "BABEL_DATADIR"; + STR_DEFINE(_dir, FRC_PATH); + _envvar = "FORCE_PARAM_PATH"; _filename = "resdata.txt"; _subdir = "data"; _dataptr = ResidueData; @@ -878,7 +878,7 @@ void OBGlobalDataBase::Init() string s = "Unable to open data file '"; s += _filename; s += "'"; - obErrorLog.ThrowError(__FUNCTION__, s, obWarning); + obErrorLog.ThrowError(__func__, s, obWarning); } if (ifs1) @@ -895,7 +895,7 @@ void OBGlobalDataBase::Init() string s = "Cannot initialize database '"; s += _filename; s += "' which may cause further errors."; - obErrorLog.ThrowError(__FUNCTION__, "Cannot initialize database", obWarning); + obErrorLog.ThrowError(__func__, "Cannot initialize database", obWarning); } }