if (confPath != NULL) res = gmetadom_Setup::loadConfiguration(Globals::configuration, confPath); if (!res) res = gmetadom_Setup::loadConfiguration(Globals::configuration, PKGDATADIR"/math-engine-configuration.xml"); if (!res) res = gmetadom_Setup::loadConfiguration(Globals::configuration, "config/math-engine-configuration.xml");
if (confPath != NULL) res = GtkMathView_Setup::loadConfiguration(Globals::configuration, confPath); if (!res) res = GtkMathView_Setup::loadConfiguration(Globals::configuration, PKGDATADIR"/math-engine-configuration.xml"); if (!res) res = GtkMathView_Setup::loadConfiguration(Globals::configuration, "config/math-engine-configuration.xml");
initGlobalData(const char* confPath){  static bool done = false;  assert(!done);  initTokens();  bool res = false;  if (confPath != NULL) res = gmetadom_Setup::loadConfiguration(Globals::configuration, confPath);  if (!res) res = gmetadom_Setup::loadConfiguration(Globals::configuration, PKGDATADIR"/math-engine-configuration.xml");  if (!res) res = gmetadom_Setup::loadConfiguration(Globals::configuration, "config/math-engine-configuration.xml");  if (!res)    {      Globals::logger(LOG_ERROR, "could not load configuration file");      exit(-1);    }  if (!Globals::configuration.getDictionaries().empty())    for (std::vector<std::string>::const_iterator dit = Globals::configuration.getDictionaries().begin();	 dit != Globals::configuration.getDictionaries().end();	 dit++)      {	Globals::logger(LOG_DEBUG, "loading dictionary `%s'", (*dit).c_str());	if (!gmetadom_Setup::loadOperatorDictionary(Globals::dictionary, (*dit).c_str()))	  Globals::logger(LOG_WARNING, "could not load `%s'", (*dit).c_str());      }  else {    bool res = gmetadom_Setup::loadOperatorDictionary(Globals::dictionary, "config/dictionary.xml");    if (!res) gmetadom_Setup::loadOperatorDictionary(Globals::dictionary, PKGDATADIR"/dictionary.xml");  }  done = true;}