debian-bugs-dist.lists.debian.org
[Top] [All Lists]

Bug#274181: centericq: FTBFS with gcc-3.4: 'pobject' undeclared

Subject: Bug#274181: centericq: FTBFS with gcc-3.4: 'pobject' undeclared
From: Julien Lemoine
Date: Thu, 30 Sep 2004 22:21:05 +0200
Hello,

Andreas Jochens wrote:

Package: centericq
Severity: normal
Tags: patch

When building 'centericq' with gcc-3.4 I get the following error:

c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../libicq2000    -Wall -g -O2 -c 
ContactTree.cpp
In file included from ../libicq2000/Contact.h:29,
                from ../libicq2000/ContactTree.h:30,
                from ContactTree.cpp:22:
I tried your patch (see the attached .dpatch file), but it does not work, centericq
run into an infinite loop at startup with your patch.
I do not have time to investigate this for the moment, any help are welcome.

Best Regards.

--
Julien Lemoine / SpeedBlue
"Savoir que les choses sont sans espoir et cependant tout faire pour les changer", Francis Scott Fitzgerald


#! /bin/sh -e
## gcc34.dpatch by Julien LEMOINE <speedblue@xxxxxxxxxx>
##
## DP: apply patch from "Andreas Jochens" <aj@xxxxxxxxx> to fix compilation
## DP: error with g++ 3.4

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
          echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
          exit 1;;
esac

exit 0
diff -bBdNrw -U5 centericq-4.12.0/libicq2000-0.1/libicq2000/sigslot.h 
centericq-4.12.0-modif/libicq2000-0.1/libicq2000/sigslot.h
--- centericq-4.12.0/libicq2000-0.1/libicq2000/sigslot.h        2004-02-11 
00:51:44.000000000 +0100
+++ centericq-4.12.0-modif/libicq2000-0.1/libicq2000/sigslot.h  2004-09-30 
21:16:25.000000000 +0200
@@ -743,12 +743,12 @@
        class _connection0 : public _connection_base0<mt_policy>
        {
        public:
                _connection0()
                {
-                       pobject = NULL;
-                       pmemfun = NULL;
+                       this->pobject = NULL;
+                       this->pmemfun = NULL;
                }
 
                _connection0(dest_type* pobject, void (dest_type::*pmemfun)())
                {
                        m_pobject = pobject;
@@ -784,12 +784,12 @@
        class _connection1 : public _connection_base1<arg1_type, mt_policy>
        {
        public:
                _connection1()
                {
-                       pobject = NULL;
-                       pmemfun = NULL;
+                       this->pobject = NULL;
+                       this->pmemfun = NULL;
                }
 
                _connection1(dest_type* pobject, void 
(dest_type::*pmemfun)(arg1_type))
                {
                        m_pobject = pobject;
@@ -825,12 +825,12 @@
        class _connection2 : public _connection_base2<arg1_type, arg2_type, 
mt_policy>
        {
        public:
                _connection2()
                {
-                       pobject = NULL;
-                       pmemfun = NULL;
+                       this->pobject = NULL;
+                       this->pmemfun = NULL;
                }
 
                _connection2(dest_type* pobject, void 
(dest_type::*pmemfun)(arg1_type, arg2_type))
                {
                        m_pobject = pobject;
@@ -870,10 +870,12 @@
        class _sig_connection2;
        template<class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
        class signal0 : public _signal_base0<mt_policy>
        {
        public:
+       typedef typename std::list<_connection_base0<mt_policy> *>
+       connections_list;
                signal0()
                {
                        ;
                }
 
@@ -887,31 +889,31 @@
                        void connect(dest_type* pclass, void 
(dest_type::*pmemfun)())
                {
                        lock_block<mt_policy> lock(this);
                        _connection0<dest_type, mt_policy>* conn
                            = new _connection0<dest_type, mt_policy>(pclass, 
pmemfun);
-                       m_connected_slots.push_back(conn);
+                       this->m_connected_slots.push_back(conn);
                        pclass->signal_connect(this);
                }
 
                void connect(signal0<mt_policy>& chainsig)
                {
                        lock_block<mt_policy> lock(this);
                        _sig_connection0<mt_policy>* conn = new 
_sig_connection0<mt_policy>(chainsig);
-                       m_connected_slots.push_back(conn);
+                       this->m_connected_slots.push_back(conn);
                        chainsig.signal_connect(this);
                }
 
                void emit()
                {
                        lock_block<mt_policy> lock(this);
-                       typename connections_list::const_iterator itNext, it = 
m_connected_slots.begin();
-                       typename connections_list::const_iterator itEnd = 
m_connected_slots.end();
+                       typename connections_list::const_iterator itNext, it = 
this->m_connected_slots.begin();
+                       typename connections_list::const_iterator itEnd = 
this->m_connected_slots.end();
 
                        while(it != itEnd)
                        {
-                               itNext = it;
+                               itNext = this->it;
                                ++itNext;
 
                                (*it)->emit();
 
                                it = itNext;
@@ -919,12 +921,12 @@
                }
 
                void operator()()
                {
                        lock_block<mt_policy> lock(this);
-                       typename connections_list::const_iterator itNext, it = 
m_connected_slots.begin();
-                       typename connections_list::const_iterator itEnd = 
m_connected_slots.end();
+                       typename connections_list::const_iterator itNext, it = 
this->m_connected_slots.begin();
+                       typename connections_list::const_iterator itEnd = 
this->m_connected_slots.end();
 
                        while(it != itEnd)
                        {
                                itNext = it;
                                ++itNext;
@@ -938,10 +940,12 @@
 
        template<class arg1_type, class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
        class signal1 : public _signal_base1<arg1_type, mt_policy>
        {
        public:
+       typedef typename std::list<_connection_base1<arg1_type, mt_policy> *>
+       connections_list;
                signal1()
                {
                        ;
                }
 
@@ -955,27 +959,27 @@
                        void connect(dest_type* pclass, void 
(dest_type::*pmemfun)(arg1_type))
                {
                        lock_block<mt_policy> lock(this);
                        _connection1<dest_type, arg1_type, mt_policy>* conn
                            = new _connection1<dest_type, arg1_type, 
mt_policy>(pclass, pmemfun);
-                       m_connected_slots.push_back(conn);
+                       this->m_connected_slots.push_back(conn);
                        pclass->signal_connect(this);
                }
 
                void connect(signal1<arg1_type, mt_policy>& chainsig)
                {
                        lock_block<mt_policy> lock(this);
                        _sig_connection1<arg1_type, mt_policy>* conn = new 
_sig_connection1<arg1_type, mt_policy>(chainsig);
-                       m_connected_slots.push_back(conn);
+                       this->m_connected_slots.push_back(conn);
                        chainsig.signal_connect(this);
                }
 
                void emit(arg1_type a1)
                {
                        lock_block<mt_policy> lock(this);
-                       typename connections_list::const_iterator itNext, it = 
m_connected_slots.begin();
-                       typename connections_list::const_iterator itEnd = 
m_connected_slots.end();
+                       typename connections_list::const_iterator itNext, it = 
this->m_connected_slots.begin();
+                       typename connections_list::const_iterator itEnd = 
this->m_connected_slots.end();
 
                        while(it != itEnd)
                        {
                                itNext = it;
                                ++itNext;
@@ -987,12 +991,12 @@
                }
 
                void operator()(arg1_type a1)
                {
                        lock_block<mt_policy> lock(this);
-                       typename connections_list::const_iterator itNext, it = 
m_connected_slots.begin();
-                       typename connections_list::const_iterator itEnd = 
m_connected_slots.end();
+                       typename connections_list::const_iterator itNext, it = 
this->m_connected_slots.begin();
+                       typename connections_list::const_iterator itEnd = 
this->m_connected_slots.end();
 
                        while(it != itEnd)
                        {
                                itNext = it;
                                ++itNext;
@@ -1006,10 +1010,12 @@
 
        template<class arg1_type, class arg2_type, class mt_policy = 
SIGSLOT_DEFAULT_MT_POLICY>
        class signal2 : public _signal_base2<arg1_type, arg2_type, mt_policy>
        {
        public:
+       typedef typename std::list<_connection_base2<arg1_type, arg2_type, 
mt_policy> *>
+       connections_list;
                signal2()
                {
                        ;
                }
 
@@ -1023,27 +1029,27 @@
                        void connect(dest_type* pclass, void 
(dest_type::*pmemfun)(arg1_type, arg2_type))
                {
                        lock_block<mt_policy> lock(this);
                        _connection2<dest_type, arg1_type, arg2_type, 
mt_policy>* conn
                            = new _connection2<dest_type, arg1_type, arg2_type, 
mt_policy>(pclass, pmemfun);
-                       m_connected_slots.push_back(conn);
+                       this->m_connected_slots.push_back(conn);
                        pclass->signal_connect(this);
                }
 
                void connect(signal2<arg1_type, arg2_type, mt_policy>& chainsig)
                {
                        lock_block<mt_policy> lock(this);
                        _sig_connection2<arg1_type, arg2_type, mt_policy>* conn 
= new _sig_connection2<arg1_type, arg2_type, mt_policy>(chainsig);
-                       m_connected_slots.push_back(conn);
+                       this->m_connected_slots.push_back(conn);
                        chainsig.signal_connect(this);
                }
 
                void emit(arg1_type a1, arg2_type a2)
                {
                        lock_block<mt_policy> lock(this);
-                       typename connections_list::const_iterator itNext, it = 
m_connected_slots.begin();
-                       typename connections_list::const_iterator itEnd = 
m_connected_slots.end();
+                       typename connections_list::const_iterator itNext, it = 
this->m_connected_slots.begin();
+                       typename connections_list::const_iterator itEnd = 
this->m_connected_slots.end();
 
                        while(it != itEnd)
                        {
                                itNext = it;
                                ++itNext;
@@ -1055,12 +1061,12 @@
                }
 
                void operator()(arg1_type a1, arg2_type a2)
                {
                        lock_block<mt_policy> lock(this);
-                       typename connections_list::const_iterator itNext, it = 
m_connected_slots.begin();
-                       typename connections_list::const_iterator itEnd = 
m_connected_slots.end();
+                       typename connections_list::const_iterator itNext, it = 
this->m_connected_slots.begin();
+                       typename connections_list::const_iterator itEnd = 
this->m_connected_slots.end();
 
                        while(it != itEnd)
                        {
                                itNext = it;
                                ++itNext;
diff -bBdNrw -U5 centericq-4.12.0/src/accountmanager.cc 
centericq-4.12.0-modif/src/accountmanager.cc
--- centericq-4.12.0/src/accountmanager.cc      2004-07-09 01:52:48.000000000 
+0200
+++ centericq-4.12.0-modif/src/accountmanager.cc        2004-09-30 
21:17:39.000000000 +0200
@@ -73,11 +73,11 @@
     treeview &t = *db.gettree();
 
     for(fin = false; !fin; ) {
        t.clear();
 
-       for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+       for(pname = icq; pname != protocolname_size; ++pname) {
            account = conf.getourid(pname);
 
            if(pname != rss)
            if(gethook(pname).enabled() || !account.empty()) {
                account = conf.getourid(pname);
diff -bBdNrw -U5 centericq-4.12.0/src/centericq.cc 
centericq-4.12.0-modif/src/centericq.cc
--- centericq-4.12.0/src/centericq.cc   2004-07-27 09:38:32.000000000 +0200
+++ centericq-4.12.0-modif/src/centericq.cc     2004-09-30 21:22:07.000000000 
+0200
@@ -69,11 +69,11 @@
        char *p = getenv("LANG");
 
        if(p)
        if(rus = (((string) p).substr(0, 2) == "ru")) {
            conf.setcharsets("cp1251", "koi8-r");
-           for(protocolname pname = icq; pname != protocolname_size; (int) 
pname += 1)
+           for(protocolname pname = icq; pname != protocolname_size; pname = 
(protocolname)((int) pname + 1))
                conf.setcpconvert(pname, true);
        }
 
        if(updateconf()) {
            manager.exec();
@@ -122,11 +122,11 @@
     icqconf::imaccount ia;
     bool r;
 
     r = regmode = true;
 
-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+    for(pname = icq; pname != protocolname_size; pname = (protocolname)((int) 
pname + 1)) {
        if(gethook(pname).enabled() && 
!gethook(pname).getCapabs().count(hookcapab::optionalpassword)) {
            if(!(ia = conf.getourid(pname)).empty()) {
                if(ia.password.empty()) {
                    conf.setsavepwd(false);
 
@@ -150,11 +150,11 @@
 }
 
 void centericq::inithooks() {
     protocolname pname;
 
-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+    for(pname = icq; pname != protocolname_size; pname = (protocolname)((int) 
pname + 1)) {
        gethook(pname).init();
     }
 }
 
 void centericq::mainloop() {
@@ -842,11 +842,11 @@
 
 void centericq::rereadstatus() {
     protocolname pname;
     icqconf::imaccount ia;
 
-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+    for(pname = icq; pname != protocolname_size; pname = (protocolname)((int) 
pname + 1)) {
        ia = conf.getourid(pname);
 
        if(!ia.empty()) {
            char cst;
            imstatus st;
@@ -855,11 +855,11 @@
 
            if(f.is_open()) {
                f >> cst, f.close(), f.clear();
                unlink(fname.c_str());
 
-               for(st = offline; st != imstatus_size; (int) st += 1) {
+               for(st = offline; st != imstatus_size; st = (imstatus)((int) st 
+ 1)) {
                    if(imstatus2char[st] == cst) {
                        gethook(pname).setstatus(st);
                        break;
                    }
                }
@@ -1379,11 +1379,11 @@
        online = false;
 
        if(!regmode) {
            exectimers();
 
-           for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+           for(pname = icq; pname != protocolname_size; pname = 
(protocolname)((int) pname + 1)) {
                abstracthook &hook = gethook(pname);
 
                if(hook.online()) {
                    hook.getsockets(rfds, wfds, efds, hsockfd);
                    online = true;
@@ -1398,11 +1398,11 @@
 
        if(FD_ISSET(0, &rfds)) {
            keypressed = true;
            time(&timer_keypress);
        } else {
-           for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+         for(pname = icq; pname != protocolname_size; pname = 
(protocolname)((int) pname + 1)) {
                abstracthook &hook = gethook(pname);
 
                if(hook.online())
                if(hook.isoursocket(rfds, wfds, efds)) {
                    hook.main();
@@ -1428,11 +1428,11 @@
     if(autoset && (astatus == available)) {
        face.log(_("+ the user is back"));
        nautoset = false;
     }
 
-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+    for(pname = icq; pname != protocolname_size; pname = (protocolname)((int) 
pname + 1)) {
        abstracthook &hook = gethook(pname);
        stcurrent = hook.getstatus();
 
        if(hook.logged())
        switch(stcurrent) {
@@ -1579,11 +1579,11 @@
        checkconfigs();
        conf.checkdiskspace();
 
        if(!conf.enoughdiskspace()) {
            if(fonline) {
-               for(pname = icq; pname != protocolname_size; (int) pname += 1)
+             for(pname = icq; pname != protocolname_size; pname = 
(protocolname)((int) pname + 1))
                    gethook(pname).disconnect();
 
                face.log(_("! free disk space is less than 10k, going 
offline"));
                face.log(_("! otherwise we can lose events and configuration"));
            }
diff -bBdNrw -U5 centericq-4.12.0/src/hooks/abstracthook.cc 
centericq-4.12.0-modif/src/hooks/abstracthook.cc
--- centericq-4.12.0/src/hooks/abstracthook.cc  2004-07-21 00:16:40.000000000 
+0200
+++ centericq-4.12.0-modif/src/hooks/abstracthook.cc    2004-09-30 
21:22:44.000000000 +0200
@@ -69,11 +69,11 @@
 }
 
 void abstracthook::setstatus(imstatus st) {
     setautostatus(manualstatus = st);
 
-    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 
1) {
+    for(protocolname pname = icq; pname != protocolname_size; pname = 
(protocolname)((int) pname + 1)) {
        if(&gethook(pname) == this) {
            conf.savestatus(pname, manualstatus);
            break;
        }
     }
diff -bBdNrw -U5 centericq-4.12.0/src/icqconf.cc 
centericq-4.12.0-modif/src/icqconf.cc
--- centericq-4.12.0/src/icqconf.cc     2004-09-28 00:17:31.000000000 +0200
+++ centericq-4.12.0-modif/src/icqconf.cc       2004-09-30 21:28:04.000000000 
+0200
@@ -50,11 +50,11 @@
     hideoffline = antispam = makelog = askaway = logtimestamps =
        logonline = emacs = proxyssl = proxyconnect = notitles = false;
 
     savepwd = mailcheck = fenoughdiskspace = true;
 
-    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 
1) {
+    for(protocolname pname = icq; pname != protocolname_size; pname = 
(protocolname)(pname + 1)) {
        chatmode[pname] = true;
        cpconvert[pname] = entersends[pname] = nonimonline[pname] = false;
     }
 
     basedir = (string) getenv("HOME") + "/.centericq/";
@@ -418,11 +418,11 @@
            if(param == "tocharset") tocharset = buf; else
            if(param == "ptp") {
                ptpmin = atoi(getword(buf, "-").c_str());
                ptpmax = atoi(buf.c_str());
            } else {
-               for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+             for(pname = icq; pname != protocolname_size; ++pname ) {
                    buf = getprotocolname(pname);
                    if(param.substr(0, buf.size()) == buf) {
                        im = getourid(pname);
                        im.read(rbuf);
                        setourid(im);
@@ -430,11 +430,11 @@
                }
            }
        }
 
        if(fromcharset.empty() && tocharset.empty())
-       for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+         for(pname = icq; pname != protocolname_size; ++pname) {
            if(getcpconvert(pname)) {
                fromcharset = "cp1251";
                tocharset = "koi8-r";
                break;
            }
@@ -471,29 +471,29 @@
            if(getantispam()) f << "antispam" << endl;
            if(getmailcheck()) f << "mailcheck" << endl;
            if(getaskaway()) f << "askaway" << endl;
 
            param = "";
-           for(protocolname pname = icq; pname != protocolname_size; (int) 
pname += 1)
+           for(protocolname pname = icq; pname != protocolname_size; ++pname)
                if(getchatmode(pname)) param += (string) " " + 
conf.getprotocolname(pname);
            if(!param.empty())
                f << "chatmode" << param << endl;
 
            param = "";
-           for(protocolname pname = icq; pname != protocolname_size; (int) 
pname += 1)
+           for(protocolname pname = icq; pname != protocolname_size; ++pname)
                if(getentersends(pname)) param += (string) " " + 
conf.getprotocolname(pname);
            if(!param.empty())
                f << "entersends" << param << endl;
 
            param = "";
-           for(protocolname pname = icq; pname != protocolname_size; (int) 
pname += 1)
+           for(protocolname pname = icq; pname != protocolname_size; ++pname)
                if(getnonimonline(pname)) param += (string) " " + 
conf.getprotocolname(pname);
            if(!param.empty())
                f << "nonimonline" << param << endl;
 
            param = "";
-           for(protocolname pname = icq; pname != protocolname_size; (int) 
pname += 1)
+           for(protocolname pname = icq; pname != protocolname_size; ++pname)
                if(getcpconvert(pname)) param += (string) " " + 
conf.getprotocolname(pname);
            if(!param.empty())
                f << "convert" << param << endl;
 
            f << "fromcharset\t" << fromcharset << endl;
@@ -611,12 +611,11 @@
     soundnames.push_back(eventsound(imevent::online, "online"));
     soundnames.push_back(eventsound(imevent::email, "email"));
 
     for(i = 0; i < clist.count; i++) {
        c = (icqcontact *) clist.at(i);
-
-       for(it = imevent::message; it != imevent::imeventtype_size; (int) it += 
1) {
+       for(it = imevent::message; it != imevent::imeventtype_size; it = 
(imevent::imeventtype)(it + 1)) {
            c->setsound(it, "");
        }
     }
 
     if(access(tname.c_str(), F_OK)) {
@@ -690,11 +689,11 @@
                    suin.erase(0, i+1);
 
                    imcontact ic;
                    protocolname pname;
 
-                   for(pname = icq; pname != protocolname_size && skey != 
getprotocolname(pname); (int) pname += 1);
+                   for(pname = icq; pname != protocolname_size && skey != 
getprotocolname(pname); +pname);
 
                    if(pname != protocolname_size) {
                        if(suin == "*") {
                            for(i = 0; i < clist.count; i++) {
                                c = (icqcontact *) clist.at(i);
@@ -1012,11 +1011,11 @@
     map<string, string>::iterator ia;
     imaccount a = getourid(pname);
 
     if((ia = a.additional.find("status")) != a.additional.end()) {
        if(!ia->second.empty()) {
-           for(st = offline; st != imstatus_size && imstatus2char[st] != 
ia->second[0]; (int) st += 1);
+         for(st = offline; st != imstatus_size && imstatus2char[st] != 
ia->second[0]; st = (imstatus)(st + 1));
            if(st == imstatus_size) st = available;
        }
     }
 
     return st;
@@ -1099,11 +1098,11 @@
        } else if((args == "-v") || (args == "--version")) {
            cout << PACKAGE << " " << VERSION << endl
                << "Written by Konstantin Klyagin." << endl
                << "Built-in protocols are:";
 
-           for(protocolname pname = icq; pname != protocolname_size; (int) 
pname += 1)
+           for(protocolname pname = icq; pname != protocolname_size; ++pname)
                if(gethook(pname).enabled()) cout << " " << 
conf.getprotocolname(pname);
 
            cout << endl << endl
                << "This is free software; see the source for copying 
conditions.  There is NO" << endl
                << "warranty; not even for MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE." << endl;
@@ -1152,11 +1151,11 @@
        }
        cdest = imcontact(strtoul(dest.c_str(), 0, 0), icq);
     } else {
        protocolname pname;
 
-       for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+       for(pname = icq; pname != protocolname_size; ++pname) {
            if(getprotocolname(pname) == proto) {
                cdest = imcontact(dest, pname);
                break;
            }
        }
@@ -1235,15 +1234,15 @@
 void icqconf::externalstatuschange(char st, const string &proto) const {
     imstatus imst;
     protocolname pname;
 
     if(st) {
-       for(pname = icq; pname != protocolname_size; (int) pname += 1)
+      for(pname = icq; pname != protocolname_size; ++pname)
            if(getprotocolname(pname) == proto)
                break;
 
-       for(imst = offline; imst != imstatus_size; (int) imst += 1)
+      for(imst = offline; imst != imstatus_size; imst = (imstatus)(imst + 1))
            if(imstatus2char[imst] == st)
                break;
 
        try {
            if(pname != protocolname_size) {
@@ -1321,15 +1320,15 @@
 
 void icqconf::initmultiproto(bool p[], string buf, bool excludenochat) {
     string w;
     protocolname pname;
 
-    for(pname = icq; pname != protocolname_size; (int) pname += 1)
+    for(pname = icq; pname != protocolname_size; ++pname)
        p[pname] = buf.empty();
 
     while(!(w = getword(buf)).empty()) {
-       for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+      for(pname = icq; pname != protocolname_size; ++pname) {
            if(getprotocolname(pname) == w) {
                if(excludenochat) {
                    p[pname] = 
!gethook(pname).getCapabs().count(hookcapab::nochat);
                } else {
                    p[pname] = true;
diff -bBdNrw -U5 centericq-4.12.0/src/icqcontact.cc 
centericq-4.12.0-modif/src/icqcontact.cc
--- centericq-4.12.0/src/icqcontact.cc  2004-09-28 00:17:31.000000000 +0200
+++ centericq-4.12.0-modif/src/icqcontact.cc    2004-09-30 21:28:36.000000000 
+0200
@@ -46,11 +46,11 @@
     lastread = fhistoffset = 0;
     status = offline;
     finlist = true;
     congratulated = false;
 
-    for(ie = imevent::message; ie != imevent::imeventtype_size; (int) ie += 1)
+    for(ie = imevent::message; ie != imevent::imeventtype_size; ie = 
(imevent::imeventtype)((int) ie + 1))
        sound[ie] = "";
 
     cdesc = adesc;
 
     switch(cdesc.pname) {
diff -bBdNrw -U5 centericq-4.12.0/src/icqdialogs.cc 
centericq-4.12.0-modif/src/icqdialogs.cc
--- centericq-4.12.0/src/icqdialogs.cc  2004-07-31 02:00:15.000000000 +0200
+++ centericq-4.12.0-modif/src/icqdialogs.cc    2004-09-30 21:34:32.000000000 
+0200
@@ -172,11 +172,11 @@
 
     string tname, act;
     imsearchparams ts;
 
     if(subj != fsrss) {
-       for(protocolname apname = icq; apname != protocolname_size; (int) 
apname += 1) {
+      for(protocolname apname = icq; apname != protocolname_size; ++apname) {
            if(subj == fschannel)
            if(!gethook(apname).getCapabs().count(hookcapab::conferencing))
                continue;
 
            if(gethook(apname).logged() || apname == infocard) {
@@ -935,11 +935,11 @@
 void icqface::selectgender(imgender &f) {
     verticalmenu m(conf.getcolor(cp_dialog_menu), 
conf.getcolor(cp_dialog_selected));
     m.setwindow(textwindow(4, LINES-8, 20, LINES-4, 
conf.getcolor(cp_dialog_menu)));
     m.idle = &menuidle;
 
-    for(imgender i = genderUnspec; i != imgender_size; (int) i += 1) {
+    for(imgender i = genderUnspec; i != imgender_size; i = (imgender)(i + 1)) {
        m.additemf(0, (int) i, " %s", strgender(i));
        if(i == f) m.setpos(m.getcount()-1);
     }
 
     int i = m.open();
@@ -951,11 +951,11 @@
 void icqface::selectagerange(ICQ2000::AgeRange &r) {
     verticalmenu m(conf.getcolor(cp_dialog_menu), 
conf.getcolor(cp_dialog_selected));
     m.setwindow(textwindow(4, LINES-8, 18, LINES-3, 
conf.getcolor(cp_dialog_menu)));
     m.idle = &menuidle;
 
-    for(ICQ2000::AgeRange i = ICQ2000::RANGE_NORANGE; i <= 
ICQ2000::RANGE_60_ABOVE; (int) i += 1) {
+    for(ICQ2000::AgeRange i = ICQ2000::RANGE_NORANGE; i <= 
ICQ2000::RANGE_60_ABOVE; i = (ICQ2000::AgeRange)(i + 1)) {
        const char *p = stragerange(i);
 
        if(i == ICQ2000::RANGE_NORANGE)
            p = _("none");
 
@@ -1071,15 +1071,15 @@
 }
 
 void icqface::multichange(bool conv[], bool newstate) {
     protocolname pname;
 
-    for(pname = icq; pname != protocolname_size; (int) pname += 1)
+    for(pname = icq; pname != protocolname_size; ++pname)
        if((!conf.getourid(pname).empty() || pname == rss) && conv[pname]) 
break;
 
     if(pname == protocolname_size || !newstate) {
-       for(pname = icq; pname != protocolname_size; (int) pname += 1)
+      for(pname = icq; pname != protocolname_size; ++pname)
            if(!conf.getourid(pname).empty() || pname == rss)
                conv[pname] = newstate;
     }
 }
 
@@ -1132,11 +1132,11 @@
     icqconf::groupmode gmode = conf.getgroupmode();
 
     bool chatmode[protocolname_size], conv[protocolname_size],
        entersends[protocolname_size], nonimonline[protocolname_size];
 
-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+    for(pname = icq; pname != protocolname_size; ++pname) {
        chatmode[pname] = conf.getchatmode(pname);
        entersends[pname] = conf.getentersends(pname);
        conv[pname] = conf.getcpconvert(pname);
        nonimonline[pname] = conf.getnonimonline(pname);
     }
@@ -1182,11 +1182,11 @@
     #endif
        t.addleaff(i, 0, 23, _(" Enable emacs bindings in text editor : %s "), 
stryesno(emacs));
 
        i = t.addnode(_(" Codepages conversion "));
 
-       for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
+       for(tmp = "", pname = icq; pname != protocolname_size; ++pname)
        if(conv[pname])
        if(!conf.getourid(pname).empty() || pname == rss)
            tmp += conf.getprotocolname(pname) + " ";
 
        t.addleaff(i, 0, 26, _(" Switch to language preset : %s "), 
iconvlang->c_str());
@@ -1205,17 +1205,17 @@
        t.addleaff(i, 0, 15, _(" Check the local mailbox : %s "), 
stryesno(mailcheck));
        t.addleaff(i, 0, 13, _(" Remember passwords : %s "), stryesno(savepwd));
        t.addleaff(i, 0,  7, _(" Edit away message on status change : %s "), 
stryesno(askaway));
 
        if(hasany) {
-           for(tmp = "", pname = icq; pname != protocolname_size; (int) pname 
+= 1)
+         for(tmp = "", pname = icq; pname != protocolname_size; ++pname)
                if(chatmode[pname] && !conf.getourid(pname).empty())
                    tmp += conf.getprotocolname(pname) + " ";
 
            t.addleaff(i, 0, 16, _(" Chat messaging mode for : %s"), 
tmp.c_str());
 
-           for(tmp = "", pname = icq; pname != protocolname_size; (int) pname 
+= 1)
+           for(tmp = "", pname = icq; pname != protocolname_size; ++pname)
                if(entersends[pname] && !conf.getourid(pname).empty())
                    tmp += conf.getprotocolname(pname) + " ";
 
            t.addleaff(i, 0, 25, _(" Enter key sends message for : %s"), 
tmp.c_str());
 
@@ -1223,11 +1223,11 @@
            t.addleaff(i, 0, 16, _(" Chat messaging mode : %s "), 
stryesno(chatmode[icq]));
            t.addleaff(i, 0, 25, _(" Enter key sends message : %s "), 
stryesno(entersends[icq]));
 
        }
 
-       for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
+       for(tmp = "", pname = icq; pname != protocolname_size; ++pname)
            if(nonimonline[pname]) tmp += conf.getprotocolname(pname) + " ";
 
        t.addleaff(i, 0, 29, _(" Always online non-IM contacts for : %s"), 
tmp.c_str());
 
        i = t.addnode(_(" Communications "));
@@ -1270,11 +1270,11 @@
                            c == icqconf::rcdark ? icqconf::rcblue :
                                icqconf::rcdontchange;
                        break;
                    case 3:
                        if(hasany) selectproto(conv, spIMplusRSS); else
-                           for(pname = icq; pname != protocolname_size; (int) 
pname += 1)
+                         for(pname = icq; pname != protocolname_size; ++pname)
                                conv[pname] = !conv[pname];
                        break;
                    case 4:
                        tmp = inputstr(_("Auto Away period (0 - disable): "), 
i2str(aaway));
                        if(!tmp.empty()) aaway = atol(tmp.c_str());
@@ -1292,11 +1292,11 @@
                    case 13: savepwd = !savepwd; break;
                    case 14: antispam = !antispam; break;
                    case 15: mailcheck = !mailcheck; break;
                    case 16:
                        if(hasany) selectproto(chatmode); else
-                           for(pname = icq; pname != protocolname_size; (int) 
pname += 1)
+                         for(pname = icq; pname != protocolname_size; ++pname)
                                chatmode[pname] = !chatmode[pname];
                        break;
 
                    case 17:
                        gmode =
@@ -1332,11 +1332,11 @@
                    case 24:
                        httpproxy = inputstr(_("HTTP proxy server hostname: "), 
httpproxy);
                        break;
                    case 25:
                        if(hasany) selectproto(entersends); else
-                           for(pname = icq; pname != protocolname_size; (int) 
pname += 1)
+                         for(pname = icq; pname != protocolname_size; ++pname)
                                entersends[pname] = !entersends[pname];
                        break;
                    case 26:
                        iconvlang++;
                        if(iconvlang == convlanguages.end())
@@ -1386,11 +1386,11 @@
                conf.setmakelog(makelog);
                conf.setaskaway(askaway);
                conf.setproxyconnect(proxyconnect);
                conf.setcharsets(convertfrom, convertto);
 
-               for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+               for(pname = icq; pname != protocolname_size; ++pname) {
                    conf.setchatmode(pname, chatmode[pname]);
                    conf.setentersends(pname, entersends[pname]);
                    conf.setnonimonline(pname, nonimonline[pname]);
 
                    bool bconv = conv[pname] && (!convertfrom.empty() || 
!convertto.empty());
@@ -1431,11 +1431,11 @@
     bool aprots[protocolname_size];
 
     i = 0;
     memcpy(aprots, prots, sizeof(aprots));
 
-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+    for(pname = icq; pname != protocolname_size; ++pname) {
        if(mode == spnonIM) {
            if(pname != infocard)
            if(!gethook(pname).getCapabs().count(hookcapab::nochat))
                continue;
 
diff -bBdNrw -U5 centericq-4.12.0/src/icqface.cc 
centericq-4.12.0-modif/src/icqface.cc
--- centericq-4.12.0/src/icqface.cc     2004-09-28 00:17:31.000000000 +0200
+++ centericq-4.12.0-modif/src/icqface.cc       2004-09-30 21:36:36.000000000 
+0200
@@ -206,11 +206,11 @@
 void icqface::showtopbar() {
     string buf;
     protocolname pname;
     icqconf::imaccount ia;
 
-    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
+    for(pname = icq; pname != protocolname_size; pname = (protocolname)((int) 
pname + 1)) {
        ia = conf.getourid(pname);
 
        if(!ia.empty()) {
            buf += " ";
            buf += conf.getprotocolname(pname) + ":";
@@ -1318,11 +1318,11 @@
        _(" [lj] LiveJournal"),
        _(" [gg] Gadu-Gadu"),
        ""
     };
 
-    for(ipname = icq; ipname != protocolname_size; (int) ipname += 1) {
+    for(ipname = icq; ipname != protocolname_size; ipname = 
(protocolname)((int) ipname + 1)) {
        ia = conf.getourid(ipname);
 
        if(!ia.empty()) {
            m.additem(0, ipname, pitems[ipname]);
        }
@@ -1341,11 +1341,11 @@
     m.setwindow(textwindow(sizeWArea.x1, sizeWArea.y1, sizeWArea.x1+27,
        sizeWArea.y1+9, conf.getcolor(cp_main_text)));
 
     m.idle = &menuidle;
 
-    for(protcount = 0, pname = icq; pname != protocolname_size; (int) pname += 
1) {
+    for(protcount = 0, pname = icq; pname != protocolname_size; pname = 
(protocolname)((int) pname + 1)) {
        if(!conf.getourid(pname).empty()) {
            protcount++;
            onechoice = pname;
        }
 
@@ -1370,16 +1370,16 @@
     }
 
     if(r = i) {
        switch(choice) {
            case -1:
-               for(pname = icq; pname != protocolname_size; (int) pname += 1)
+             for(pname = icq; pname != protocolname_size; pname = 
(protocolname)((int) pname + 1))
                    if(!conf.getourid(pname).empty())
                        pnames.push_back(pname);
                break;
            case -2:
-               for(pname = icq; pname != protocolname_size; (int) pname += 1)
+             for(pname = icq; pname != protocolname_size; pname = 
(protocolname)((int) pname + 1))
                    if(!conf.getourid(pname).empty())
                    if(gethook(pname).getstatus() != offline)
                        pnames.push_back(pname);
                break;
            default:
@@ -1656,11 +1656,11 @@
        cs == csvisible     ? _("Visible list") :
        cs == csinvisible   ? _("Invisible list") : "");
 
     set<protocolname> ps;
     if(cs == csvisible || cs == csinvisible) {
-       for(protocolname pname = icq; pname != protocolname_size; (int) pname 
+= 1)
+      for(protocolname pname = icq; pname != protocolname_size; pname = 
(protocolname)((int) pname + 1))
            if(gethook(pname).getCapabs().count(hookcapab::visibility))
                ps.insert(pname);
     }
 
     lst.fillmenu(db.getmenu(), cs);
diff -bBdNrw -U5 centericq-4.12.0/src/icqgroup.cc 
centericq-4.12.0-modif/src/icqgroup.cc
--- centericq-4.12.0/src/icqgroup.cc    2003-11-22 20:14:33.000000000 +0100
+++ centericq-4.12.0-modif/src/icqgroup.cc      2004-09-30 21:37:32.000000000 
+0200
@@ -80,8 +80,8 @@
 
 void icqgroup::rename(const string &aname) {
     string oldname = name;
     name = aname;
 
-    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
+    for(protocolname pname = icq; pname != protocolname_size; pname = 
(protocolname)((int) pname + 1))
        gethook(pname).renamegroup(oldname, name);
 }
diff -bBdNrw -U5 centericq-4.12.0/src/imcontact.h 
centericq-4.12.0-modif/src/imcontact.h
--- centericq-4.12.0/src/imcontact.h    2004-01-18 10:56:39.000000000 +0100
+++ centericq-4.12.0-modif/src/imcontact.h      2004-09-30 21:38:07.000000000 
+0200
@@ -16,10 +16,12 @@
     infocard,
 
     protocolname_size
 };
 
+inline protocolname &operator++(protocolname p) { return p=protocolname(p+1); }
+
 enum imstatus {
     offline = 0,
     available,
     invisible,
     freeforchat,
diff -bBdNrw -U5 centericq-4.12.0/src/imevents.cc 
centericq-4.12.0-modif/src/imevents.cc
--- centericq-4.12.0/src/imevents.cc    2004-04-11 18:32:28.000000000 +0200
+++ centericq-4.12.0-modif/src/imevents.cc      2004-09-30 21:38:53.000000000 
+0200
@@ -109,18 +109,18 @@
 
     getstring(f, rdbuf);
     if(rdbuf == "\f")
        getstring(f, rdbuf);
 
-    for(direction = incoming; direction != imdirection_size; (int) direction 
+= 1)
+    for(direction = incoming; direction != imdirection_size; direction = 
(imevent::imdirection)(direction + 1))
        if(sdirection[direction] == rdbuf) break;
 
     getstring(f, rdbuf);
     type = imeventtype_size;
 
     if(rdbuf != "") {
-       for(type = message; type != imeventtype_size; (int) type += 1)
+      for(type = message; type != imeventtype_size; type = 
(imevent::imeventtype)(type + 1))
            if(seventtype[type] == rdbuf) break;
     }
 
     getstring(f, rdbuf);
     timestamp = strtoul(rdbuf.c_str(), 0, 0);
diff -bBdNrw -U5 centericq-4.12.0/src/imexternal.cc 
centericq-4.12.0-modif/src/imexternal.cc
--- centericq-4.12.0/src/imexternal.cc  2004-03-20 17:49:08.000000000 +0100
+++ centericq-4.12.0-modif/src/imexternal.cc    2004-09-30 21:39:33.000000000 
+0200
@@ -391,21 +391,21 @@
 
            param = getword(buf);
 
            if(param == "event") {
                while(!(param = getword(buf)).empty()) {
-                   for(imevent::imeventtype et = imevent::message; et != 
imevent::imeventtype_size; (int) et += 1) {
+                 for(imevent::imeventtype et = imevent::message; et != 
imevent::imeventtype_size; et = (imevent::imeventtype)(et + 1)) {
                        if((param == geteventname(et))
                        || (param == "all")) {
                            event.insert(et);
                        }
                    }
                }
 
            } else if(param == "proto") {
                while(!(param = getword(buf)).empty()) {
-                   for(protocolname pname = icq; pname != protocolname_size; 
(int) pname += 1) {
+                 for(protocolname pname = icq; pname != protocolname_size; 
++pname) {
                        if((param == conf.getprotocolname(pname))
                        || (param == "all")) {
                            proto.insert(pname);
                        }
                    }
<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy