From: <no...@us...> - 2004-04-27 18:21:41
|
Update of /cvsroot/sim-icq/sim/sim/api In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31483/sim/api Modified Files: plugins.cpp Log Message: fixed: Warning: Unreachable Code Index: plugins.cpp =================================================================== RCS file: /cvsroot/sim-icq/sim/sim/api/plugins.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** plugins.cpp 18 Apr 2004 14:43:53 -0000 1.38 --- plugins.cpp 27 Apr 2004 18:21:32 -0000 1.39 *************** *** 587,596 **** void PluginManagerPrivate::loadState() { ! if (m_bLoaded) ! return; ! m_bLoaded = true; string cfgName = user_file(PLUGINS_CONF); QFile f(QFile::decodeName(cfgName.c_str())); ! if (!f.exists()) { /* Maybe first start ? */ QDir dir(user_file(NULL).c_str()); --- 587,597 ---- void PluginManagerPrivate::loadState() { ! if (m_bLoaded) return; ! ! m_bLoaded = true; string cfgName = user_file(PLUGINS_CONF); QFile f(QFile::decodeName(cfgName.c_str())); ! ! if (!f.exists()) { /* Maybe first start ? */ QDir dir(user_file(NULL).c_str()); *************** *** 609,626 **** } } ! if (!f.open(IO_ReadOnly)){ log(L_ERROR, "Can't open %s", f.name().ascii()); return; } ! Buffer cfg; cfg.init(f.size()); int n = f.readBlock(cfg.data(), f.size()); ! if (n < 0){ log(L_ERROR, "Can't read %s", f.name().ascii()); return; } ! for (;;){ ! string section = cfg.getSection(); ! if (section.empty()) return; unsigned i = NO_PLUGIN; --- 610,634 ---- } } ! ! if (!f.open(IO_ReadOnly)){ log(L_ERROR, "Can't open %s", f.name().ascii()); return; } ! ! Buffer cfg; cfg.init(f.size()); int n = f.readBlock(cfg.data(), f.size()); ! ! if (n < 0){ log(L_ERROR, "Can't read %s", f.name().ascii()); return; } ! ! bool continous=TRUE; ! while(continous) { ! ! string section = cfg.getSection(); ! ! if (section.empty()) return; unsigned i = NO_PLUGIN; *************** *** 633,640 **** if (i == NO_PLUGIN) continue; pluginInfo &info = plugins[i]; const char *line = cfg.getLine(); ! if (line == NULL) ! continue; string token = getToken(line, ','); if (token == ENABLE){ --- 641,650 ---- if (i == NO_PLUGIN) continue; + pluginInfo &info = plugins[i]; const char *line = cfg.getLine(); ! ! if (line == NULL) ! continue; string token = getToken(line, ','); if (token == ENABLE){ *************** *** 646,655 **** info.bFromCfg = true; } ! else ! continue; info.base = atol(line); if (info.base > m_base) m_base = info.base; if (cfg.readPos() < cfg.writePos()){ plugins[i].cfg = new Buffer; --- 656,666 ---- info.bFromCfg = true; } ! else {continue;} info.base = atol(line); + if (info.base > m_base) m_base = info.base; + if (cfg.readPos() < cfg.writePos()){ plugins[i].cfg = new Buffer; |