Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 50193 | Differences between
and this patch

Collapse All | Expand All

(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/libicq2000-0.1/libicq2000/sigslot.h (-24 / +24 lines)
Lines 745-752 Link Here
745
	public:
745
	public:
746
		_connection0()
746
		_connection0()
747
		{
747
		{
748
			pobject = NULL;
748
			this->pobject = NULL;
749
			pmemfun = NULL;
749
			this->pmemfun = NULL;
750
		}
750
		}
751
751
752
		_connection0(dest_type* pobject, void (dest_type::*pmemfun)())
752
		_connection0(dest_type* pobject, void (dest_type::*pmemfun)())
Lines 786-793 Link Here
786
	public:
786
	public:
787
		_connection1()
787
		_connection1()
788
		{
788
		{
789
			pobject = NULL;
789
			this->pobject = NULL;
790
			pmemfun = NULL;
790
			this->pmemfun = NULL;
791
		}
791
		}
792
792
793
		_connection1(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type))
793
		_connection1(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type))
Lines 827-834 Link Here
827
	public:
827
	public:
828
		_connection2()
828
		_connection2()
829
		{
829
		{
830
			pobject = NULL;
830
			this->pobject = NULL;
831
			pmemfun = NULL;
831
			this->pmemfun = NULL;
832
		}
832
		}
833
833
834
		_connection2(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, arg2_type))
834
		_connection2(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, arg2_type))
Lines 889-895 Link Here
889
			lock_block<mt_policy> lock(this);
889
			lock_block<mt_policy> lock(this);
890
			_connection0<dest_type, mt_policy>* conn
890
			_connection0<dest_type, mt_policy>* conn
891
			    = new _connection0<dest_type, mt_policy>(pclass, pmemfun);
891
			    = new _connection0<dest_type, mt_policy>(pclass, pmemfun);
892
			m_connected_slots.push_back(conn);
892
			this->m_connected_slots.push_back(conn);
893
			pclass->signal_connect(this);
893
			pclass->signal_connect(this);
894
		}
894
		}
895
895
Lines 897-911 Link Here
897
		{
897
		{
898
			lock_block<mt_policy> lock(this);
898
			lock_block<mt_policy> lock(this);
899
			_sig_connection0<mt_policy>* conn = new _sig_connection0<mt_policy>(chainsig);
899
			_sig_connection0<mt_policy>* conn = new _sig_connection0<mt_policy>(chainsig);
900
			m_connected_slots.push_back(conn);
900
			this->m_connected_slots.push_back(conn);
901
			chainsig.signal_connect(this);
901
			chainsig.signal_connect(this);
902
		}
902
		}
903
903
904
		void emit()
904
		void emit()
905
		{
905
		{
906
			lock_block<mt_policy> lock(this);
906
			lock_block<mt_policy> lock(this);
907
			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
907
			typename _signal_base0< mt_policy >::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
908
			typename connections_list::const_iterator itEnd = m_connected_slots.end();
908
			typename _signal_base0< mt_policy >::connections_list::const_iterator itEnd = this->m_connected_slots.end();
909
909
910
			while(it != itEnd)
910
			while(it != itEnd)
911
			{
911
			{
Lines 921-928 Link Here
921
		void operator()()
921
		void operator()()
922
		{
922
		{
923
			lock_block<mt_policy> lock(this);
923
			lock_block<mt_policy> lock(this);
924
			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
924
			typename _signal_base0< mt_policy >::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
925
			typename connections_list::const_iterator itEnd = m_connected_slots.end();
925
			typename _signal_base0< mt_policy >::connections_list::const_iterator itEnd = this->m_connected_slots.end();
926
926
927
			while(it != itEnd)
927
			while(it != itEnd)
928
			{
928
			{
Lines 957-963 Link Here
957
			lock_block<mt_policy> lock(this);
957
			lock_block<mt_policy> lock(this);
958
			_connection1<dest_type, arg1_type, mt_policy>* conn
958
			_connection1<dest_type, arg1_type, mt_policy>* conn
959
			    = new _connection1<dest_type, arg1_type, mt_policy>(pclass, pmemfun);
959
			    = new _connection1<dest_type, arg1_type, mt_policy>(pclass, pmemfun);
960
			m_connected_slots.push_back(conn);
960
			this->m_connected_slots.push_back(conn);
961
			pclass->signal_connect(this);
961
			pclass->signal_connect(this);
962
		}
962
		}
963
963
Lines 965-979 Link Here
965
		{
965
		{
966
			lock_block<mt_policy> lock(this);
966
			lock_block<mt_policy> lock(this);
967
			_sig_connection1<arg1_type, mt_policy>* conn = new _sig_connection1<arg1_type, mt_policy>(chainsig);
967
			_sig_connection1<arg1_type, mt_policy>* conn = new _sig_connection1<arg1_type, mt_policy>(chainsig);
968
			m_connected_slots.push_back(conn);
968
			this->m_connected_slots.push_back(conn);
969
			chainsig.signal_connect(this);
969
			chainsig.signal_connect(this);
970
		}
970
		}
971
971
972
		void emit(arg1_type a1)
972
		void emit(arg1_type a1)
973
		{
973
		{
974
			lock_block<mt_policy> lock(this);
974
			lock_block<mt_policy> lock(this);
975
			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
975
			typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
976
			typename connections_list::const_iterator itEnd = m_connected_slots.end();
976
			typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
977
977
978
			while(it != itEnd)
978
			while(it != itEnd)
979
			{
979
			{
Lines 989-996 Link Here
989
		void operator()(arg1_type a1)
989
		void operator()(arg1_type a1)
990
		{
990
		{
991
			lock_block<mt_policy> lock(this);
991
			lock_block<mt_policy> lock(this);
992
			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
992
			typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
993
			typename connections_list::const_iterator itEnd = m_connected_slots.end();
993
			typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
994
994
995
			while(it != itEnd)
995
			while(it != itEnd)
996
			{
996
			{
Lines 1025-1031 Link Here
1025
			lock_block<mt_policy> lock(this);
1025
			lock_block<mt_policy> lock(this);
1026
			_connection2<dest_type, arg1_type, arg2_type, mt_policy>* conn
1026
			_connection2<dest_type, arg1_type, arg2_type, mt_policy>* conn
1027
			    = new _connection2<dest_type, arg1_type, arg2_type, mt_policy>(pclass, pmemfun);
1027
			    = new _connection2<dest_type, arg1_type, arg2_type, mt_policy>(pclass, pmemfun);
1028
			m_connected_slots.push_back(conn);
1028
			this->m_connected_slots.push_back(conn);
1029
			pclass->signal_connect(this);
1029
			pclass->signal_connect(this);
1030
		}
1030
		}
1031
1031
Lines 1033-1047 Link Here
1033
		{
1033
		{
1034
			lock_block<mt_policy> lock(this);
1034
			lock_block<mt_policy> lock(this);
1035
			_sig_connection2<arg1_type, arg2_type, mt_policy>* conn = new _sig_connection2<arg1_type, arg2_type, mt_policy>(chainsig);
1035
			_sig_connection2<arg1_type, arg2_type, mt_policy>* conn = new _sig_connection2<arg1_type, arg2_type, mt_policy>(chainsig);
1036
			m_connected_slots.push_back(conn);
1036
			this->m_connected_slots.push_back(conn);
1037
			chainsig.signal_connect(this);
1037
			chainsig.signal_connect(this);
1038
		}
1038
		}
1039
1039
1040
		void emit(arg1_type a1, arg2_type a2)
1040
		void emit(arg1_type a1, arg2_type a2)
1041
		{
1041
		{
1042
			lock_block<mt_policy> lock(this);
1042
			lock_block<mt_policy> lock(this);
1043
			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
1043
			typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
1044
			typename connections_list::const_iterator itEnd = m_connected_slots.end();
1044
			typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
1045
1045
1046
			while(it != itEnd)
1046
			while(it != itEnd)
1047
			{
1047
			{
Lines 1057-1064 Link Here
1057
		void operator()(arg1_type a1, arg2_type a2)
1057
		void operator()(arg1_type a1, arg2_type a2)
1058
		{
1058
		{
1059
			lock_block<mt_policy> lock(this);
1059
			lock_block<mt_policy> lock(this);
1060
			typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
1060
			typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
1061
			typename connections_list::const_iterator itEnd = m_connected_slots.end();
1061
			typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
1062
1062
1063
			while(it != itEnd)
1063
			while(it != itEnd)
1064
			{
1064
			{
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/accountmanager.cc (-14 / +14 lines)
Lines 47-53 Link Here
47
47
48
void accountmanager::exec() {
48
void accountmanager::exec() {
49
    dialogbox db;
49
    dialogbox db;
50
    protocolname pname;
50
    int pname;
51
    icqconf::imaccount account;
51
    icqconf::imaccount account;
52
    int n, b, i, citem, action, pos;
52
    int n, b, i, citem, action, pos;
53
    set<hookcapab::enumeration> capab;
53
    set<hookcapab::enumeration> capab;
Lines 75-89 Link Here
75
    for(fin = false; !fin; ) {
75
    for(fin = false; !fin; ) {
76
	t.clear();
76
	t.clear();
77
77
78
	for(pname = icq; pname != protocolname_size; (int) pname += 1) {
78
	for(pname = icq; pname != protocolname_size; pname += 1) {
79
	    account = conf.getourid(pname);
79
	    account = conf.getourid((protocolname)pname);
80
80
81
	    if(pname != rss)
81
	    if(pname != rss)
82
	    if(gethook(pname).enabled() || !account.empty()) {
82
	    if(gethook((protocolname)pname).enabled() || !account.empty()) {
83
		account = conf.getourid(pname);
83
		account = conf.getourid((protocolname)pname);
84
		n = t.addnode(0, 0, 0, " " + conf.getprotocolname(pname) + " ");
84
		n = t.addnode(0, 0, 0, " " + conf.getprotocolname((protocolname)pname) + " ");
85
		citem = ((int) (pname)+1) * 100;
85
		citem = (pname+1) * 100;
86
		capab = gethook(pname).getCapabs();
86
		capab = gethook((protocolname)pname).getCapabs();
87
87
88
		if(!account.empty()) {
88
		if(!account.empty()) {
89
		    tmp = "";
89
		    tmp = "";
Lines 154-162 Link Here
154
	    pname = (protocolname) (citem/100-1);
154
	    pname = (protocolname) (citem/100-1);
155
	    action = citem-(citem/100)*100;
155
	    action = citem-(citem/100)*100;
156
156
157
	    spname = conf.getprotocolname(pname);
157
	    spname = conf.getprotocolname((protocolname)pname);
158
	    account = conf.getourid(pname);
158
	    account = conf.getourid((protocolname)pname);
159
	    abstracthook &hook = gethook(pname);
159
	    abstracthook &hook = gethook((protocolname)pname);
160
160
161
	    switch(action) {
161
	    switch(action) {
162
		case 1:
162
		case 1:
Lines 190-196 Link Here
190
190
191
		case 8:
191
		case 8:
192
		    if(!hook.online()) {
192
		    if(!hook.online()) {
193
			account = icqconf::imaccount(pname);
193
			account = icqconf::imaccount((protocolname)pname);
194
		    } else {
194
		    } else {
195
			face.status(_("You have to disconnect the service first!"));
195
			face.status(_("You have to disconnect the service first!"));
196
		    }
196
		    }
Lines 215-223 Link Here
215
		    break;
215
		    break;
216
216
217
		case 10:
217
		case 10:
218
		    if(face.edit(tmp = conf.getawaymsg(pname),
218
		    if(face.edit(tmp = conf.getawaymsg((protocolname)pname),
219
		    spname + ": " + _("away message"))) {
219
		    spname + ": " + _("away message"))) {
220
			conf.setawaymsg(pname, tmp);
220
			conf.setawaymsg((protocolname)pname, tmp);
221
		    }
221
		    }
222
		    break;
222
		    break;
223
223
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/centericq.cc (-39 / +39 lines)
Lines 71-78 Link Here
71
	if(p)
71
	if(p)
72
	if(rus = (((string) p).substr(0, 2) == "ru")) {
72
	if(rus = (((string) p).substr(0, 2) == "ru")) {
73
	    conf.setcharsets("cp1251", "koi8-r");
73
	    conf.setcharsets("cp1251", "koi8-r");
74
	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
74
	    for(int pname = icq; pname != protocolname_size; pname += 1)
75
		conf.setcpconvert(pname, true);
75
		conf.setcpconvert((protocolname)pname, true);
76
	}
76
	}
77
77
78
	if(updateconf()) {
78
	if(updateconf()) {
Lines 118-137 Link Here
118
}
118
}
119
119
120
bool centericq::checkpasswords() {
120
bool centericq::checkpasswords() {
121
    protocolname pname;
121
    int pname;
122
    icqconf::imaccount ia;
122
    icqconf::imaccount ia;
123
    bool r;
123
    bool r;
124
124
125
    r = regmode = true;
125
    r = regmode = true;
126
126
127
    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
127
    for(pname = icq; pname != protocolname_size; pname += 1) {
128
	if(!gethook(pname).getCapabs().count(hookcapab::optionalpassword)) {
128
	if(!gethook((protocolname)pname).getCapabs().count(hookcapab::optionalpassword)) {
129
	    if(!(ia = conf.getourid(pname)).empty()) {
129
	    if(!(ia = conf.getourid((protocolname)pname)).empty()) {
130
		if(ia.password.empty()) {
130
		if(ia.password.empty()) {
131
		    conf.setsavepwd(false);
131
		    conf.setsavepwd(false);
132
132
133
		    ia.password = face.inputstr("[" +
133
		    ia.password = face.inputstr("[" +
134
			conf.getprotocolname(pname) + "] " +
134
			conf.getprotocolname((protocolname)pname) + "] " +
135
			_("password: "), "", '*');
135
			_("password: "), "", '*');
136
136
137
		    if(ia.password.empty()) {
137
		    if(ia.password.empty()) {
Lines 150-159 Link Here
150
}
150
}
151
151
152
void centericq::inithooks() {
152
void centericq::inithooks() {
153
    protocolname pname;
153
    int pname;
154
154
155
    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
155
    for(pname = icq; pname != protocolname_size; pname += 1) {
156
	gethook(pname).init();
156
	gethook((protocolname)pname).init();
157
    }
157
    }
158
}
158
}
159
159
Lines 836-860 Link Here
836
}
836
}
837
837
838
void centericq::rereadstatus() {
838
void centericq::rereadstatus() {
839
    protocolname pname;
839
    int pname;
840
    icqconf::imaccount ia;
840
    icqconf::imaccount ia;
841
841
842
    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
842
    for(pname = icq; pname != protocolname_size; pname += 1) {
843
	ia = conf.getourid(pname);
843
	ia = conf.getourid((protocolname)pname);
844
844
845
	if(!ia.empty()) {
845
	if(!ia.empty()) {
846
	    char cst;
846
	    char cst;
847
	    imstatus st;
847
	    int st;
848
	    string fname = conf.getconfigfname((string) "status-" + conf.getprotocolname(pname));
848
	    string fname = conf.getconfigfname((string) "status-" + conf.getprotocolname((protocolname)pname));
849
	    ifstream f(fname.c_str());
849
	    ifstream f(fname.c_str());
850
850
851
	    if(f.is_open()) {
851
	    if(f.is_open()) {
852
		f >> cst, f.close(), f.clear();
852
		f >> cst, f.close(), f.clear();
853
		unlink(fname.c_str());
853
		unlink(fname.c_str());
854
854
855
		for(st = offline; st != imstatus_size; (int) st += 1) {
855
		for(st = offline; st != imstatus_size; st += 1) {
856
		    if(imstatus2char[st] == cst) {
856
		    if(imstatus2char[st] == cst) {
857
			gethook(pname).setstatus(st);
857
			gethook((protocolname)pname).setstatus((imstatus)st);
858
			break;
858
			break;
859
		    }
859
		    }
860
		}
860
		}
Lines 1360-1366 Link Here
1360
    fd_set rfds, wfds, efds;
1360
    fd_set rfds, wfds, efds;
1361
    struct timeval tv;
1361
    struct timeval tv;
1362
    int hsockfd;
1362
    int hsockfd;
1363
    protocolname pname;
1363
    int pname;
1364
1364
1365
    for(keypressed = fin = false; !keypressed && !fin; ) {
1365
    for(keypressed = fin = false; !keypressed && !fin; ) {
1366
	timer_keypress = lastkeypress();
1366
	timer_keypress = lastkeypress();
Lines 1375-1382 Link Here
1375
	if(!regmode) {
1375
	if(!regmode) {
1376
	    exectimers();
1376
	    exectimers();
1377
1377
1378
	    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
1378
	    for(pname = icq; pname != protocolname_size; pname += 1) {
1379
		abstracthook &hook = gethook(pname);
1379
		abstracthook &hook = gethook((protocolname)pname);
1380
1380
1381
		if(hook.online()) {
1381
		if(hook.online()) {
1382
		    hook.getsockets(rfds, wfds, efds, hsockfd);
1382
		    hook.getsockets(rfds, wfds, efds, hsockfd);
Lines 1394-1401 Link Here
1394
	    keypressed = true;
1394
	    keypressed = true;
1395
	    time(&timer_keypress);
1395
	    time(&timer_keypress);
1396
	} else {
1396
	} else {
1397
	    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
1397
	    for(pname = icq; pname != protocolname_size; pname += 1) {
1398
		abstracthook &hook = gethook(pname);
1398
		abstracthook &hook = gethook((protocolname)pname);
1399
1399
1400
		if(hook.online())
1400
		if(hook.online())
1401
		if(hook.isoursocket(rfds, wfds, efds)) {
1401
		if(hook.isoursocket(rfds, wfds, efds)) {
Lines 1410-1416 Link Here
1410
}
1410
}
1411
1411
1412
void centericq::setauto(imstatus astatus) {
1412
void centericq::setauto(imstatus astatus) {
1413
    protocolname pname;
1413
    int pname;
1414
    imstatus stcurrent;
1414
    imstatus stcurrent;
1415
    static bool autoset = false;
1415
    static bool autoset = false;
1416
    bool nautoset, changed = false;
1416
    bool nautoset, changed = false;
Lines 1424-1431 Link Here
1424
	nautoset = false;
1424
	nautoset = false;
1425
    }
1425
    }
1426
1426
1427
    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
1427
    for(pname = icq; pname != protocolname_size; pname += 1) {
1428
	abstracthook &hook = gethook(pname);
1428
	abstracthook &hook = gethook((protocolname)pname);
1429
	stcurrent = hook.getstatus();
1429
	stcurrent = hook.getstatus();
1430
1430
1431
	if(hook.logged())
1431
	if(hook.logged())
Lines 1437-1443 Link Here
1437
	    default:
1437
	    default:
1438
		if(autoset && (astatus == available)) {
1438
		if(autoset && (astatus == available)) {
1439
		    face.log(_("+ [%s] status restored"),
1439
		    face.log(_("+ [%s] status restored"),
1440
			conf.getprotocolname(pname).c_str());
1440
			conf.getprotocolname((protocolname)pname).c_str());
1441
1441
1442
		    hook.restorestatus();
1442
		    hook.restorestatus();
1443
		    nautoset = false;
1443
		    nautoset = false;
Lines 1452-1458 Link Here
1452
			nautoset = changed = true;
1452
			nautoset = changed = true;
1453
1453
1454
			face.log(_("+ [%s] automatically set %s"),
1454
			face.log(_("+ [%s] automatically set %s"),
1455
			    conf.getprotocolname(pname).c_str(),
1455
			    conf.getprotocolname((protocolname)pname).c_str(),
1456
			    astatus == away ? _("away") : _("n/a"));
1456
			    astatus == away ? _("away") : _("n/a"));
1457
		    }
1457
		    }
1458
		}
1458
		}
Lines 1469-1475 Link Here
1469
#define MINCK0(x, y)       (x ? (y ? (x > y ? y : x) : x) : y)
1469
#define MINCK0(x, y)       (x ? (y ? (x > y ? y : x) : x) : y)
1470
1470
1471
void centericq::exectimers() {
1471
void centericq::exectimers() {
1472
    protocolname pname;
1472
    int pname;
1473
    int paway, pna;
1473
    int paway, pna;
1474
    bool fonline = false;
1474
    bool fonline = false;
1475
1475
Lines 1481-1489 Link Here
1481
    *
1481
    *
1482
    */
1482
    */
1483
1483
1484
    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
1484
    for(pname = icq; pname != protocolname_size; pname += 1) {
1485
	if(!conf.getourid(pname).empty() || (pname == rss)) {
1485
	if(!conf.getourid((protocolname)pname).empty() || (pname == rss)) {
1486
	    abstracthook &hook = gethook(pname);
1486
	    abstracthook &hook = gethook((protocolname)pname);
1487
1487
1488
	    /*
1488
	    /*
1489
	    *
1489
	    *
Lines 1495-1501 Link Here
1495
1495
1496
	    static map<protocolname, reconnectInfo> reconnect;
1496
	    static map<protocolname, reconnectInfo> reconnect;
1497
1497
1498
	    if(timer_current-reconnect[pname].timer > reconnect[pname].period) {
1498
	    if(timer_current-reconnect[(protocolname)pname].timer > reconnect[(protocolname)pname].period) {
1499
		/*
1499
		/*
1500
		*
1500
		*
1501
		* Any need to try auto re-connecting?
1501
		* Any need to try auto re-connecting?
Lines 1503-1517 Link Here
1503
		*/
1503
		*/
1504
1504
1505
		if(!hook.logged()) {
1505
		if(!hook.logged()) {
1506
		    time(&reconnect[pname].timer);
1506
		    time(&reconnect[(protocolname)pname].timer);
1507
1507
1508
		    if(reconnect[pname].period < 180)
1508
		    if(reconnect[(protocolname)pname].period < 180)
1509
			reconnect[pname].period += reconnect[pname].period/2;
1509
			reconnect[(protocolname)pname].period += reconnect[(protocolname)pname].period/2;
1510
1510
1511
		    if(hook.online()) {
1511
		    if(hook.online()) {
1512
			hook.disconnect();
1512
			hook.disconnect();
1513
1513
1514
		    } else if(conf.getstatus(pname) != offline) {
1514
		    } else if(conf.getstatus((protocolname)pname) != offline) {
1515
			if(conf.enoughdiskspace() && !manager.isopen()) {
1515
			if(conf.enoughdiskspace() && !manager.isopen()) {
1516
			    hook.connect();
1516
			    hook.connect();
1517
			}
1517
			}
Lines 1519-1525 Link Here
1519
		    }
1519
		    }
1520
		} else {
1520
		} else {
1521
		    fonline = true;
1521
		    fonline = true;
1522
		    reconnect[pname] = reconnectInfo();
1522
		    reconnect[(protocolname)pname] = reconnectInfo();
1523
		}
1523
		}
1524
	    }
1524
	    }
1525
	}
1525
	}
Lines 1577-1584 Link Here
1577
1577
1578
	if(!conf.enoughdiskspace()) {
1578
	if(!conf.enoughdiskspace()) {
1579
	    if(fonline) {
1579
	    if(fonline) {
1580
		for(pname = icq; pname != protocolname_size; (int) pname += 1)
1580
		for(pname = icq; pname != protocolname_size; pname += 1)
1581
		    gethook(pname).disconnect();
1581
		    gethook((protocolname)pname).disconnect();
1582
1582
1583
		face.log(_("! free disk space is less than 10k, going offline"));
1583
		face.log(_("! free disk space is less than 10k, going offline"));
1584
		face.log(_("! otherwise we can lose events and configuration"));
1584
		face.log(_("! otherwise we can lose events and configuration"));
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/hooks/abstracthook.cc (-3 / +3 lines)
Lines 71-79 Link Here
71
void abstracthook::setstatus(imstatus st) {
71
void abstracthook::setstatus(imstatus st) {
72
    setautostatus(manualstatus = st);
72
    setautostatus(manualstatus = st);
73
73
74
    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1) {
74
    for(int pname = icq; pname != protocolname_size; pname += 1) {
75
	if(&gethook(pname) == this) {
75
	if(&gethook((protocolname)pname) == this) {
76
	    conf.savestatus(pname, manualstatus);
76
	    conf.savestatus((protocolname)pname, manualstatus);
77
	    break;
77
	    break;
78
	}
78
	}
79
    }
79
    }
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/icqconf.cc (-42 / +42 lines)
Lines 52-58 Link Here
52
52
53
    savepwd = mailcheck = fenoughdiskspace = true;
53
    savepwd = mailcheck = fenoughdiskspace = true;
54
54
55
    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1) {
55
    for(int pname = icq; pname != protocolname_size; pname += 1) {
56
	chatmode[pname] = true;
56
	chatmode[pname] = true;
57
	cpconvert[pname] = entersends[pname] = nonimonline[pname] = false;
57
	cpconvert[pname] = entersends[pname] = nonimonline[pname] = false;
58
    }
58
    }
Lines 376-382 Link Here
376
    string fname = getconfigfname("config"), buf, param, rbuf;
376
    string fname = getconfigfname("config"), buf, param, rbuf;
377
    ifstream f(fname.c_str());
377
    ifstream f(fname.c_str());
378
    imaccount im;
378
    imaccount im;
379
    protocolname pname;
379
    int pname;
380
380
381
    if(f.is_open()) {
381
    if(f.is_open()) {
382
	mailcheck = askaway = false;
382
	mailcheck = askaway = false;
Lines 418-427 Link Here
418
		ptpmin = atoi(getword(buf, "-").c_str());
418
		ptpmin = atoi(getword(buf, "-").c_str());
419
		ptpmax = atoi(buf.c_str());
419
		ptpmax = atoi(buf.c_str());
420
	    } else {
420
	    } else {
421
		for(pname = icq; pname != protocolname_size; (int) pname += 1) {
421
		for(pname = icq; pname != protocolname_size; pname += 1) {
422
		    buf = getprotocolname(pname);
422
		    buf = getprotocolname((protocolname)pname);
423
		    if(param.substr(0, buf.size()) == buf) {
423
		    if(param.substr(0, buf.size()) == buf) {
424
			im = getourid(pname);
424
			im = getourid((protocolname)pname);
425
			im.read(rbuf);
425
			im.read(rbuf);
426
			setourid(im);
426
			setourid(im);
427
		    }
427
		    }
Lines 430-437 Link Here
430
	}
430
	}
431
431
432
	if(fromcharset.empty() && tocharset.empty())
432
	if(fromcharset.empty() && tocharset.empty())
433
	for(pname = icq; pname != protocolname_size; (int) pname += 1) {
433
	for(pname = icq; pname != protocolname_size; pname += 1) {
434
	    if(getcpconvert(pname)) {
434
	    if(getcpconvert((protocolname)pname)) {
435
		fromcharset = "cp1251";
435
		fromcharset = "cp1251";
436
		tocharset = "koi8-r";
436
		tocharset = "koi8-r";
437
		break;
437
		break;
Lines 470-495 Link Here
470
	    if(getaskaway()) f << "askaway" << endl;
470
	    if(getaskaway()) f << "askaway" << endl;
471
471
472
	    param = "";
472
	    param = "";
473
	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
473
	    for(int pname = icq; pname != protocolname_size; pname += 1)
474
		if(getchatmode(pname)) param += (string) " " + conf.getprotocolname(pname);
474
		if(getchatmode((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
475
	    if(!param.empty())
475
	    if(!param.empty())
476
		f << "chatmode" << param << endl;
476
		f << "chatmode" << param << endl;
477
477
478
	    param = "";
478
	    param = "";
479
	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
479
	    for(int pname = icq; pname != protocolname_size; pname += 1)
480
		if(getentersends(pname)) param += (string) " " + conf.getprotocolname(pname);
480
		if(getentersends((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
481
	    if(!param.empty())
481
	    if(!param.empty())
482
		f << "entersends" << param << endl;
482
		f << "entersends" << param << endl;
483
483
484
	    param = "";
484
	    param = "";
485
	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
485
	    for(int pname = icq; pname != protocolname_size; pname += 1)
486
		if(getnonimonline(pname)) param += (string) " " + conf.getprotocolname(pname);
486
		if(getnonimonline((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
487
	    if(!param.empty())
487
	    if(!param.empty())
488
		f << "nonimonline" << param << endl;
488
		f << "nonimonline" << param << endl;
489
489
490
	    param = "";
490
	    param = "";
491
	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
491
	    for(int pname = icq; pname != protocolname_size; pname += 1)
492
		if(getcpconvert(pname)) param += (string) " " + conf.getprotocolname(pname);
492
		if(getcpconvert((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
493
	    if(!param.empty())
493
	    if(!param.empty())
494
		f << "convert" << param << endl;
494
		f << "convert" << param << endl;
495
495
Lines 594-600 Link Here
594
    string tname = getconfigfname("sounds"), buf, suin, skey;
594
    string tname = getconfigfname("sounds"), buf, suin, skey;
595
    int n, ffuin, i;
595
    int n, ffuin, i;
596
    icqcontact *c;
596
    icqcontact *c;
597
    imevent::imeventtype it;
597
    int it;
598
598
599
    typedef pair<imevent::imeventtype, string> eventsound;
599
    typedef pair<imevent::imeventtype, string> eventsound;
600
    vector<eventsound> soundnames;
600
    vector<eventsound> soundnames;
Lines 609-616 Link Here
609
    for(i = 0; i < clist.count; i++) {
609
    for(i = 0; i < clist.count; i++) {
610
	c = (icqcontact *) clist.at(i);
610
	c = (icqcontact *) clist.at(i);
611
611
612
	for(it = imevent::message; it != imevent::imeventtype_size; (int) it += 1) {
612
	for(it = imevent::message; it != imevent::imeventtype_size; it += 1) {
613
	    c->setsound(it, "");
613
	    c->setsound((imevent::imeventtype)it, "");
614
	}
614
	}
615
    }
615
    }
616
616
Lines 685-704 Link Here
685
		    suin.erase(0, i+1);
685
		    suin.erase(0, i+1);
686
686
687
		    imcontact ic;
687
		    imcontact ic;
688
		    protocolname pname;
688
		    int pname;
689
689
690
		    for(pname = icq; pname != protocolname_size && skey != getprotocolname(pname); (int) pname += 1);
690
		    for(pname = icq; pname != protocolname_size && skey != getprotocolname((protocolname)pname); pname += 1);
691
691
692
		    if(pname != protocolname_size) {
692
		    if(pname != protocolname_size) {
693
			if(suin == "*") {
693
			if(suin == "*") {
694
			    for(i = 0; i < clist.count; i++) {
694
			    for(i = 0; i < clist.count; i++) {
695
				c = (icqcontact *) clist.at(i);
695
				c = (icqcontact *) clist.at(i);
696
696
697
				if(c->getdesc().pname == pname) c->setsound(it, buf);
697
				if(c->getdesc().pname == pname) c->setsound((imevent::imeventtype)it, buf);
698
			    }
698
			    }
699
			} else {
699
			} else {
700
			    if(pname == icq) ic = imcontact(strtoul(suin.c_str(), 0, 0), pname);
700
			    if(pname == icq) ic = imcontact(strtoul(suin.c_str(), 0, 0), (protocolname)pname);
701
				else ic = imcontact(suin, pname);
701
				else ic = imcontact(suin, (protocolname)pname);
702
702
703
			    c = clist.get(ic);
703
			    c = clist.get(ic);
704
			}
704
			}
Lines 708-714 Link Here
708
		c = clist.get(contactroot);
708
		c = clist.get(contactroot);
709
	    }
709
	    }
710
710
711
	    if(c) c->setsound(it, buf);
711
	    if(c) c->setsound((imevent::imeventtype)it, buf);
712
	}
712
	}
713
713
714
	fi.close();
714
	fi.close();
Lines 1003-1020 Link Here
1003
}
1003
}
1004
1004
1005
imstatus icqconf::getstatus(protocolname pname) {
1005
imstatus icqconf::getstatus(protocolname pname) {
1006
    imstatus st = available;
1006
    int st = available;
1007
    map<string, string>::iterator ia;
1007
    map<string, string>::iterator ia;
1008
    imaccount a = getourid(pname);
1008
    imaccount a = getourid(pname);
1009
1009
1010
    if((ia = a.additional.find("status")) != a.additional.end()) {
1010
    if((ia = a.additional.find("status")) != a.additional.end()) {
1011
	if(!ia->second.empty()) {
1011
	if(!ia->second.empty()) {
1012
	    for(st = offline; st != imstatus_size && imstatus2char[st] != ia->second[0]; (int) st += 1);
1012
	    for(st = offline; st != imstatus_size && imstatus2char[st] != ia->second[0]; st += 1);
1013
	    if(st == imstatus_size) st = available;
1013
	    if(st == imstatus_size) st = available;
1014
	}
1014
	}
1015
    }
1015
    }
1016
1016
1017
    return st;
1017
    return (imstatus)st;
1018
}
1018
}
1019
1019
1020
void icqconf::savestatus(protocolname pname, imstatus st) {
1020
void icqconf::savestatus(protocolname pname, imstatus st) {
Lines 1099-1106 Link Here
1099
		<< "Written by Konstantin Klyagin." << endl
1099
		<< "Written by Konstantin Klyagin." << endl
1100
		<< "Built-in protocols are:";
1100
		<< "Built-in protocols are:";
1101
1101
1102
	    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
1102
	    for(int pname = icq; pname != protocolname_size; pname += 1)
1103
		if(gethook(pname).enabled()) cout << " " << conf.getprotocolname(pname);
1103
		if(gethook((protocolname)pname).enabled()) cout << " " << conf.getprotocolname((protocolname)pname);
1104
1104
1105
	    cout << endl << endl
1105
	    cout << endl << endl
1106
		<< "This is free software; see the source for copying conditions.  There is NO" << endl
1106
		<< "This is free software; see the source for copying conditions.  There is NO" << endl
Lines 1150-1160 Link Here
1150
	}
1150
	}
1151
	cdest = imcontact(strtoul(dest.c_str(), 0, 0), icq);
1151
	cdest = imcontact(strtoul(dest.c_str(), 0, 0), icq);
1152
    } else {
1152
    } else {
1153
	protocolname pname;
1153
	int pname;
1154
1154
1155
	for(pname = icq; pname != protocolname_size; (int) pname += 1) {
1155
	for(pname = icq; pname != protocolname_size; pname += 1) {
1156
	    if(getprotocolname(pname) == proto) {
1156
	    if(getprotocolname((protocolname)pname) == proto) {
1157
		cdest = imcontact(dest, pname);
1157
		cdest = imcontact(dest, (protocolname)pname);
1158
		break;
1158
		break;
1159
	    }
1159
	    }
1160
	}
1160
	}
Lines 1212-1227 Link Here
1212
}
1212
}
1213
1213
1214
void icqconf::externalstatuschange(char st, const string &proto) const {
1214
void icqconf::externalstatuschange(char st, const string &proto) const {
1215
    imstatus imst;
1215
    int imst;
1216
    protocolname pname;
1216
    int pname;
1217
    int rpid;
1217
    int rpid;
1218
1218
1219
    if(st) {
1219
    if(st) {
1220
	for(pname = icq; pname != protocolname_size; (int) pname += 1)
1220
	for(pname = icq; pname != protocolname_size; pname += 1)
1221
	    if(getprotocolname(pname) == proto)
1221
	    if(getprotocolname((protocolname)pname) == proto)
1222
		break;
1222
		break;
1223
1223
1224
	for(imst = offline; imst != imstatus_size; (int) imst += 1)
1224
	for(imst = offline; imst != imstatus_size; imst += 1)
1225
	    if(imstatus2char[imst] == st)
1225
	    if(imstatus2char[imst] == st)
1226
		break;
1226
		break;
1227
1227
Lines 1287-1300 Link Here
1287
1287
1288
void icqconf::initmultiproto(bool p[], string buf) {
1288
void icqconf::initmultiproto(bool p[], string buf) {
1289
    string w;
1289
    string w;
1290
    protocolname pname;
1290
    int pname;
1291
1291
1292
    for(pname = icq; pname != protocolname_size; (int) pname += 1)
1292
    for(pname = icq; pname != protocolname_size; pname += 1)
1293
	p[pname] = buf.empty();
1293
	p[pname] = buf.empty();
1294
1294
1295
    while(!(w = getword(buf)).empty()) {
1295
    while(!(w = getword(buf)).empty()) {
1296
	for(pname = icq; pname != protocolname_size; (int) pname += 1) {
1296
	for(pname = icq; pname != protocolname_size; pname += 1) {
1297
	    if(getprotocolname(pname) == w) {
1297
	    if(getprotocolname((protocolname)pname) == w) {
1298
		p[pname] = true;
1298
		p[pname] = true;
1299
		break;
1299
		break;
1300
	    }
1300
	    }
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/icqcontact.cc (-2 / +4 lines)
Lines 48-55 Link Here
48
    finlist = true;
48
    finlist = true;
49
    congratulated = false;
49
    congratulated = false;
50
50
51
    for(ie = imevent::message; ie != imevent::imeventtype_size; (int) ie += 1)
51
    int int_ie;
52
	sound[ie] = "";
52
    for(int_ie = imevent::message; int_ie != imevent::imeventtype_size; int_ie += 1)
53
	sound[(imevent::imeventtype)int_ie] = "";
54
    ie = (imevent::imeventtype)int_ie;
53
55
54
    cdesc = adesc;
56
    cdesc = adesc;
55
57
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/icqdialogs.cc (-48 / +48 lines)
Lines 174-186 Link Here
174
    imsearchparams ts;
174
    imsearchparams ts;
175
175
176
    if(subj != fsrss) {
176
    if(subj != fsrss) {
177
	for(protocolname apname = icq; apname != protocolname_size; (int) apname += 1) {
177
	for(int apname = icq; apname != protocolname_size; apname += 1) {
178
	    if(subj == fschannel)
178
	    if(subj == fschannel)
179
	    if(!gethook(apname).getCapabs().count(hookcapab::conferencing))
179
	    if(!gethook((protocolname)apname).getCapabs().count(hookcapab::conferencing))
180
		continue;
180
		continue;
181
181
182
	    if(gethook(apname).logged() || apname == infocard) {
182
	    if(gethook((protocolname)apname).logged() || apname == infocard) {
183
		penabled.push_back(apname);
183
		penabled.push_back((protocolname)apname);
184
	    }
184
	    }
185
	}
185
	}
186
186
Lines 937-944 Link Here
937
    m.setwindow(textwindow(4, LINES-8, 20, LINES-4, conf.getcolor(cp_dialog_menu)));
937
    m.setwindow(textwindow(4, LINES-8, 20, LINES-4, conf.getcolor(cp_dialog_menu)));
938
    m.idle = &menuidle;
938
    m.idle = &menuidle;
939
939
940
    for(imgender i = genderUnspec; i != imgender_size; (int) i += 1) {
940
    for(int i = genderUnspec; i != imgender_size; i += 1) {
941
	m.additemf(0, (int) i, " %s", strgender(i));
941
	m.additemf(0, i, " %s", strgender((imgender)i));
942
	if(i == f) m.setpos(m.getcount()-1);
942
	if(i == f) m.setpos(m.getcount()-1);
943
    }
943
    }
944
944
Lines 953-965 Link Here
953
    m.setwindow(textwindow(4, LINES-8, 18, LINES-3, conf.getcolor(cp_dialog_menu)));
953
    m.setwindow(textwindow(4, LINES-8, 18, LINES-3, conf.getcolor(cp_dialog_menu)));
954
    m.idle = &menuidle;
954
    m.idle = &menuidle;
955
955
956
    for(ICQ2000::AgeRange i = ICQ2000::RANGE_NORANGE; i <= ICQ2000::RANGE_60_ABOVE; (int) i += 1) {
956
    for(int i = ICQ2000::RANGE_NORANGE; i <= ICQ2000::RANGE_60_ABOVE; i += 1) {
957
	const char *p = stragerange(i);
957
	const char *p = stragerange((ICQ2000::AgeRange)i);
958
958
959
	if(i == ICQ2000::RANGE_NORANGE)
959
	if(i == ICQ2000::RANGE_NORANGE)
960
	    p = _("none");
960
	    p = _("none");
961
961
962
	m.additemf(0, (int) i, " %s", p);
962
	m.additemf(0, i, " %s", p);
963
	if(i == r) m.setpos(m.getcount()-1);
963
	if(i == r) m.setpos(m.getcount()-1);
964
    }
964
    }
965
965
Lines 1071-1084 Link Here
1071
}
1071
}
1072
1072
1073
void icqface::multichange(bool conv[], bool newstate) {
1073
void icqface::multichange(bool conv[], bool newstate) {
1074
    protocolname pname;
1074
    int pname;
1075
1075
1076
    for(pname = icq; pname != protocolname_size; (int) pname += 1)
1076
    for(pname = icq; pname != protocolname_size; pname += 1)
1077
	if((!conf.getourid(pname).empty() || pname == rss) && conv[pname]) break;
1077
	if((!conf.getourid((protocolname)pname).empty() || pname == rss) && conv[pname]) break;
1078
1078
1079
    if(pname == protocolname_size || !newstate) {
1079
    if(pname == protocolname_size || !newstate) {
1080
	for(pname = icq; pname != protocolname_size; (int) pname += 1)
1080
	for(pname = icq; pname != protocolname_size; pname += 1)
1081
	    if(!conf.getourid(pname).empty() || pname == rss)
1081
	    if(!conf.getourid((protocolname)pname).empty() || pname == rss)
1082
		conv[pname] = newstate;
1082
		conv[pname] = newstate;
1083
    }
1083
    }
1084
}
1084
}
Lines 1086-1092 Link Here
1086
bool icqface::updateconf(icqconf::regsound &s, icqconf::regcolor &c) {
1086
bool icqface::updateconf(icqconf::regsound &s, icqconf::regcolor &c) {
1087
    bool finished, success, hasany;
1087
    bool finished, success, hasany;
1088
    int nopt, n, i, b, nconf, ncomm, aaway, ana, noth, nfeat, ncl;
1088
    int nopt, n, i, b, nconf, ncomm, aaway, ana, noth, nfeat, ncl;
1089
    protocolname pname;
1089
    int pname;
1090
    string tmp, phidden;
1090
    string tmp, phidden;
1091
1091
1092
    string smtp = conf.getsmtphost() + ":" + i2str(conf.getsmtpport());
1092
    string smtp = conf.getsmtphost() + ":" + i2str(conf.getsmtpport());
Lines 1133-1147 Link Here
1133
    bool chatmode[protocolname_size], conv[protocolname_size],
1133
    bool chatmode[protocolname_size], conv[protocolname_size],
1134
	entersends[protocolname_size], nonimonline[protocolname_size];
1134
	entersends[protocolname_size], nonimonline[protocolname_size];
1135
1135
1136
    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
1136
    for(pname = icq; pname != protocolname_size; pname += 1) {
1137
	chatmode[pname] = conf.getchatmode(pname);
1137
	chatmode[pname] = conf.getchatmode((protocolname)pname);
1138
	entersends[pname] = conf.getentersends(pname);
1138
	entersends[pname] = conf.getentersends((protocolname)pname);
1139
	conv[pname] = conf.getcpconvert(pname);
1139
	conv[pname] = conf.getcpconvert((protocolname)pname);
1140
	nonimonline[pname] = conf.getnonimonline(pname);
1140
	nonimonline[pname] = conf.getnonimonline((protocolname)pname);
1141
    }
1141
    }
1142
1142
1143
    for(hasany = false, pname = icq; pname != protocolname_size && !hasany; (int) pname += 1)
1143
    for(hasany = false, pname = icq; pname != protocolname_size && !hasany; pname += 1)
1144
	hasany = !conf.getourid(pname).empty();
1144
	hasany = !conf.getourid((protocolname)pname).empty();
1145
1145
1146
    dialogbox db;
1146
    dialogbox db;
1147
1147
Lines 1183-1192 Link Here
1183
1183
1184
	i = t.addnode(_(" Codepages conversion "));
1184
	i = t.addnode(_(" Codepages conversion "));
1185
1185
1186
	for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
1186
	for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
1187
	if(conv[pname])
1187
	if(conv[pname])
1188
	if(!conf.getourid(pname).empty() || pname == rss)
1188
	if(!conf.getourid((protocolname)pname).empty() || pname == rss)
1189
	    tmp += conf.getprotocolname(pname) + " ";
1189
	    tmp += conf.getprotocolname((protocolname)pname) + " ";
1190
1190
1191
	t.addleaff(i, 0, 26, _(" Switch to language preset : %s "), iconvlang->c_str());
1191
	t.addleaff(i, 0, 26, _(" Switch to language preset : %s "), iconvlang->c_str());
1192
	t.addleaff(i, 0, 27, _(" Convert from : %s "), convertfrom.c_str());
1192
	t.addleaff(i, 0, 27, _(" Convert from : %s "), convertfrom.c_str());
Lines 1206-1220 Link Here
1206
	t.addleaff(i, 0,  7, _(" Edit away message on status change : %s "), stryesno(askaway));
1206
	t.addleaff(i, 0,  7, _(" Edit away message on status change : %s "), stryesno(askaway));
1207
1207
1208
	if(hasany) {
1208
	if(hasany) {
1209
	    for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
1209
	    for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
1210
		if(chatmode[pname] && !conf.getourid(pname).empty())
1210
		if(chatmode[pname] && !conf.getourid((protocolname)pname).empty())
1211
		    tmp += conf.getprotocolname(pname) + " ";
1211
		    tmp += conf.getprotocolname((protocolname)pname) + " ";
1212
1212
1213
	    t.addleaff(i, 0, 16, _(" Chat messaging mode for : %s"), tmp.c_str());
1213
	    t.addleaff(i, 0, 16, _(" Chat messaging mode for : %s"), tmp.c_str());
1214
1214
1215
	    for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
1215
	    for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
1216
		if(entersends[pname] && !conf.getourid(pname).empty())
1216
		if(entersends[pname] && !conf.getourid((protocolname)pname).empty())
1217
		    tmp += conf.getprotocolname(pname) + " ";
1217
		    tmp += conf.getprotocolname((protocolname)pname) + " ";
1218
1218
1219
	    t.addleaff(i, 0, 25, _(" Enter key sends message for : %s"), tmp.c_str());
1219
	    t.addleaff(i, 0, 25, _(" Enter key sends message for : %s"), tmp.c_str());
1220
1220
Lines 1224-1231 Link Here
1224
1224
1225
	}
1225
	}
1226
1226
1227
	for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
1227
	for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
1228
	    if(nonimonline[pname]) tmp += conf.getprotocolname(pname) + " ";
1228
	    if(nonimonline[pname]) tmp += conf.getprotocolname((protocolname)pname) + " ";
1229
1229
1230
	t.addleaff(i, 0, 29, _(" Always online non-IM contacts for : %s"), tmp.c_str());
1230
	t.addleaff(i, 0, 29, _(" Always online non-IM contacts for : %s"), tmp.c_str());
1231
1231
Lines 1267-1273 Link Here
1267
			break;
1267
			break;
1268
		    case 3:
1268
		    case 3:
1269
			if(hasany) selectproto(conv, spIMplusRSS); else
1269
			if(hasany) selectproto(conv, spIMplusRSS); else
1270
			    for(pname = icq; pname != protocolname_size; (int) pname += 1)
1270
			    for(pname = icq; pname != protocolname_size; pname += 1)
1271
				conv[pname] = !conv[pname];
1271
				conv[pname] = !conv[pname];
1272
			break;
1272
			break;
1273
		    case 4:
1273
		    case 4:
Lines 1288-1294 Link Here
1288
		    case 15: mailcheck = !mailcheck; break;
1288
		    case 15: mailcheck = !mailcheck; break;
1289
		    case 16:
1289
		    case 16:
1290
			if(hasany) selectproto(chatmode); else
1290
			if(hasany) selectproto(chatmode); else
1291
			    for(pname = icq; pname != protocolname_size; (int) pname += 1)
1291
			    for(pname = icq; pname != protocolname_size; pname += 1)
1292
				chatmode[pname] = !chatmode[pname];
1292
				chatmode[pname] = !chatmode[pname];
1293
			break;
1293
			break;
1294
1294
Lines 1328-1334 Link Here
1328
			break;
1328
			break;
1329
		    case 25:
1329
		    case 25:
1330
			if(hasany) selectproto(entersends); else
1330
			if(hasany) selectproto(entersends); else
1331
			    for(pname = icq; pname != protocolname_size; (int) pname += 1)
1331
			    for(pname = icq; pname != protocolname_size; pname += 1)
1332
				entersends[pname] = !entersends[pname];
1332
				entersends[pname] = !entersends[pname];
1333
			break;
1333
			break;
1334
		    case 26:
1334
		    case 26:
Lines 1381-1393 Link Here
1381
		conf.setaskaway(askaway);
1381
		conf.setaskaway(askaway);
1382
		conf.setcharsets(convertfrom, convertto);
1382
		conf.setcharsets(convertfrom, convertto);
1383
1383
1384
		for(pname = icq; pname != protocolname_size; (int) pname += 1) {
1384
		for(pname = icq; pname != protocolname_size; pname += 1) {
1385
		    conf.setchatmode(pname, chatmode[pname]);
1385
		    conf.setchatmode((protocolname)pname, chatmode[pname]);
1386
		    conf.setentersends(pname, entersends[pname]);
1386
		    conf.setentersends((protocolname)pname, entersends[pname]);
1387
		    conf.setnonimonline(pname, nonimonline[pname]);
1387
		    conf.setnonimonline((protocolname)pname, nonimonline[pname]);
1388
1388
1389
		    bool bconv = conv[pname] && (!convertfrom.empty() || !convertto.empty());
1389
		    bool bconv = conv[pname] && (!convertfrom.empty() || !convertto.empty());
1390
		    conf.setcpconvert(pname, bconv || !hasany);
1390
		    conf.setcpconvert((protocolname)pname, bconv || !hasany);
1391
		}
1391
		}
1392
1392
1393
		conf.setbidi(bidi);
1393
		conf.setbidi(bidi);
Lines 1419-1435 Link Here
1419
    int i, protmax;
1419
    int i, protmax;
1420
    bool r, finished = false;
1420
    bool r, finished = false;
1421
1421
1422
    protocolname pname;
1422
    int pname;
1423
    protocolname tempprots[protocolname_size];
1423
    protocolname tempprots[protocolname_size];
1424
    bool aprots[protocolname_size];
1424
    bool aprots[protocolname_size];
1425
1425
1426
    i = 0;
1426
    i = 0;
1427
    memcpy(aprots, prots, sizeof(aprots));
1427
    memcpy(aprots, prots, sizeof(aprots));
1428
1428
1429
    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
1429
    for(pname = icq; pname != protocolname_size; pname += 1) {
1430
	if(mode == spnonIM) {
1430
	if(mode == spnonIM) {
1431
	    if(pname != infocard)
1431
	    if(pname != infocard)
1432
	    if(!gethook(pname).getCapabs().count(hookcapab::nochat))
1432
	    if(!gethook((protocolname)pname).getCapabs().count(hookcapab::nochat))
1433
		continue;
1433
		continue;
1434
1434
1435
	    if(pname == livejournal)
1435
	    if(pname == livejournal)
Lines 1438-1456 Link Here
1438
	} else {
1438
	} else {
1439
	    if(mode != spIMplusRSS || pname != rss)
1439
	    if(mode != spIMplusRSS || pname != rss)
1440
	    if(pname != livejournal || mode == spIMonly) {
1440
	    if(pname != livejournal || mode == spIMonly) {
1441
		if(gethook(pname).getCapabs().count(hookcapab::nochat))
1441
		if(gethook((protocolname)pname).getCapabs().count(hookcapab::nochat))
1442
		    continue;
1442
		    continue;
1443
1443
1444
		if(conf.getourid(pname).empty())
1444
		if(conf.getourid((protocolname)pname).empty())
1445
		    continue;
1445
		    continue;
1446
1446
1447
	    }
1447
	    }
1448
1448
1449
	    if(!gethook(pname).enabled())
1449
	    if(!gethook((protocolname)pname).enabled())
1450
		continue;
1450
		continue;
1451
	}
1451
	}
1452
1452
1453
	tempprots[i++] = pname;
1453
	tempprots[i++] = (protocolname)pname;
1454
    }
1454
    }
1455
1455
1456
    protmax = i;
1456
    protmax = i;
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/icqface.cc (-24 / +25 lines)
Lines 204-219 Link Here
204
204
205
void icqface::showtopbar() {
205
void icqface::showtopbar() {
206
    string buf;
206
    string buf;
207
    protocolname pname;
207
    int pname;
208
    icqconf::imaccount ia;
208
    icqconf::imaccount ia;
209
209
210
    for(pname = icq; pname != protocolname_size; (int) pname += 1) {
210
    for(pname = icq; pname != protocolname_size; pname += 1) {
211
	ia = conf.getourid(pname);
211
	ia = conf.getourid((protocolname)pname);
212
212
213
	if(!ia.empty()) {
213
	if(!ia.empty()) {
214
	    buf += " ";
214
	    buf += " ";
215
	    buf += conf.getprotocolname(pname) + ":";
215
	    buf += conf.getprotocolname((protocolname)pname) + ":";
216
	    buf += imstatus2char[gethook(pname).getstatus()];
216
	    buf += imstatus2char[gethook((protocolname)pname).getstatus()];
217
//            buf += ">";
217
//            buf += ">";
218
	}
218
	}
219
    }
219
    }
Lines 1302-1308 Link Here
1302
1302
1303
void icqface::makeprotocolmenu(verticalmenu &m) {
1303
void icqface::makeprotocolmenu(verticalmenu &m) {
1304
    icqconf::imaccount ia;
1304
    icqconf::imaccount ia;
1305
    protocolname ipname;
1305
    int ipname;
1306
1306
1307
    static const string pitems[protocolname_size] = {
1307
    static const string pitems[protocolname_size] = {
1308
	_(" [icq] ICQ network"),
1308
	_(" [icq] ICQ network"),
Lines 1317-1327 Link Here
1317
	""
1317
	""
1318
    };
1318
    };
1319
1319
1320
    for(ipname = icq; ipname != protocolname_size; (int) ipname += 1) {
1320
    for(ipname = icq; ipname != protocolname_size; ipname += 1) {
1321
	ia = conf.getourid(ipname);
1321
	ia = conf.getourid((protocolname)ipname);
1322
1322
1323
	if(!ia.empty()) {
1323
	if(!ia.empty()) {
1324
	    m.additem(0, ipname, pitems[ipname]);
1324
	    m.additem(0, (protocolname)ipname, pitems[ipname]);
1325
	}
1325
	}
1326
    }
1326
    }
1327
}
1327
}
Lines 1333-1352 Link Here
1333
1333
1334
    vector<imstatus> mst;
1334
    vector<imstatus> mst;
1335
    vector<imstatus>::iterator im;
1335
    vector<imstatus>::iterator im;
1336
    protocolname pname, onechoice;
1336
    int pname;
1337
    protocolname onechoice;
1337
1338
1338
    m.setwindow(textwindow(sizeWArea.x1, sizeWArea.y1, sizeWArea.x1+27,
1339
    m.setwindow(textwindow(sizeWArea.x1, sizeWArea.y1, sizeWArea.x1+27,
1339
	sizeWArea.y1+9, conf.getcolor(cp_main_text)));
1340
	sizeWArea.y1+9, conf.getcolor(cp_main_text)));
1340
1341
1341
    m.idle = &menuidle;
1342
    m.idle = &menuidle;
1342
1343
1343
    for(protcount = 0, pname = icq; pname != protocolname_size; (int) pname += 1) {
1344
    for(protcount = 0, pname = icq; pname != protocolname_size; pname += 1) {
1344
	if(!conf.getourid(pname).empty()) {
1345
	if(!conf.getourid((protocolname)pname).empty()) {
1345
	    protcount++;
1346
	    protcount++;
1346
	    onechoice = pname;
1347
	    onechoice = (protocolname)pname;
1347
	}
1348
	}
1348
1349
1349
	alrlogged = alrlogged || gethook(pname).getstatus() != offline;
1350
	alrlogged = alrlogged || gethook((protocolname)pname).getstatus() != offline;
1350
    }
1351
    }
1351
1352
1352
    if(protcount < 2) {
1353
    if(protcount < 2) {
Lines 1369-1383 Link Here
1369
    if(r = i) {
1370
    if(r = i) {
1370
	switch(choice) {
1371
	switch(choice) {
1371
	    case -1:
1372
	    case -1:
1372
		for(pname = icq; pname != protocolname_size; (int) pname += 1)
1373
		for(pname = icq; pname != protocolname_size; pname += 1)
1373
		    if(!conf.getourid(pname).empty())
1374
		    if(!conf.getourid((protocolname)pname).empty())
1374
			pnames.push_back(pname);
1375
			pnames.push_back((protocolname)pname);
1375
		break;
1376
		break;
1376
	    case -2:
1377
	    case -2:
1377
		for(pname = icq; pname != protocolname_size; (int) pname += 1)
1378
		for(pname = icq; pname != protocolname_size; pname += 1)
1378
		    if(!conf.getourid(pname).empty())
1379
		    if(!conf.getourid((protocolname)pname).empty())
1379
		    if(gethook(pname).getstatus() != offline)
1380
		    if(gethook((protocolname)pname).getstatus() != offline)
1380
			pnames.push_back(pname);
1381
			pnames.push_back((protocolname)pname);
1381
		break;
1382
		break;
1382
	    default:
1383
	    default:
1383
		pnames.push_back((protocolname) choice);
1384
		pnames.push_back((protocolname) choice);
Lines 1655-1663 Link Here
1655
1656
1656
    set<protocolname> ps;
1657
    set<protocolname> ps;
1657
    if(cs == csvisible || cs == csinvisible) {
1658
    if(cs == csvisible || cs == csinvisible) {
1658
	for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
1659
	for(int pname = icq; pname != protocolname_size; pname += 1)
1659
	    if(gethook(pname).getCapabs().count(hookcapab::visibility))
1660
	    if(gethook((protocolname)pname).getCapabs().count(hookcapab::visibility))
1660
		ps.insert(pname);
1661
		ps.insert((protocolname)pname);
1661
    }
1662
    }
1662
1663
1663
    lst.fillmenu(db.getmenu(), cs);
1664
    lst.fillmenu(db.getmenu(), cs);
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/icqgroup.cc (-2 / +2 lines)
Lines 82-87 Link Here
82
    string oldname = name;
82
    string oldname = name;
83
    name = aname;
83
    name = aname;
84
84
85
    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
85
    for(int pname = icq; pname != protocolname_size; pname += 1)
86
	gethook(pname).renamegroup(oldname, name);
86
	gethook((protocolname)pname).renamegroup(oldname, name);
87
}
87
}
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/imevents.cc (-4 / +4 lines)
Lines 62-72 Link Here
62
}
62
}
63
63
64
imevent::imeventtype imevent::gettype() const {
64
imevent::imeventtype imevent::gettype() const {
65
    return type;
65
    return (imevent::imeventtype)type;
66
}
66
}
67
67
68
imevent::imdirection imevent::getdirection() const {
68
imevent::imdirection imevent::getdirection() const {
69
    return direction;
69
    return (imevent::imdirection)direction;
70
}
70
}
71
71
72
imcontact imevent::getcontact() const {
72
imcontact imevent::getcontact() const {
Lines 111-124 Link Here
111
    if(rdbuf == "\f")
111
    if(rdbuf == "\f")
112
	getstring(f, rdbuf);
112
	getstring(f, rdbuf);
113
113
114
    for(direction = incoming; direction != imdirection_size; (int) direction += 1)
114
    for(direction = incoming; direction != imdirection_size; direction += 1)
115
	if(sdirection[direction] == rdbuf) break;
115
	if(sdirection[direction] == rdbuf) break;
116
116
117
    getstring(f, rdbuf);
117
    getstring(f, rdbuf);
118
    type = imeventtype_size;
118
    type = imeventtype_size;
119
119
120
    if(rdbuf != "") {
120
    if(rdbuf != "") {
121
	for(type = message; type != imeventtype_size; (int) type += 1)
121
	for(type = message; type != imeventtype_size; type += 1)
122
	    if(seventtype[type] == rdbuf) break;
122
	    if(seventtype[type] == rdbuf) break;
123
    }
123
    }
124
124
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/imevents.h (-2 / +2 lines)
Lines 30-37 Link Here
30
30
31
    protected:
31
    protected:
32
	imcontact contact;
32
	imcontact contact;
33
	imeventtype type;
33
	int type;
34
	imdirection direction;
34
	int direction;
35
	time_t senttimestamp;
35
	time_t senttimestamp;
36
	time_t timestamp;
36
	time_t timestamp;
37
37
(-)/var/tmp/portage/centericq-4.9.12/work/centericq-4.9.12/src/imexternal.cc (-6 / +6 lines)
Lines 393-412 Link Here
393
393
394
	    if(param == "event") {
394
	    if(param == "event") {
395
		while(!(param = getword(buf)).empty()) {
395
		while(!(param = getword(buf)).empty()) {
396
		    for(imevent::imeventtype et = imevent::message; et != imevent::imeventtype_size; (int) et += 1) {
396
		    for(int et = imevent::message; et != imevent::imeventtype_size;  et += 1) {
397
			if((param == geteventname(et))
397
			if((param == geteventname((imevent::imeventtype)et))
398
			|| (param == "all")) {
398
			|| (param == "all")) {
399
			    event.insert(et);
399
			    event.insert((imevent::imeventtype)et);
400
			}
400
			}
401
		    }
401
		    }
402
		}
402
		}
403
403
404
	    } else if(param == "proto") {
404
	    } else if(param == "proto") {
405
		while(!(param = getword(buf)).empty()) {
405
		while(!(param = getword(buf)).empty()) {
406
		    for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1) {
406
		    for(int pname = icq; pname != protocolname_size; pname += 1) {
407
			if((param == conf.getprotocolname(pname))
407
			if((param == conf.getprotocolname((protocolname)pname))
408
			|| (param == "all")) {
408
			|| (param == "all")) {
409
			    proto.insert(pname);
409
			    proto.insert((protocolname)pname);
410
			}
410
			}
411
		    }
411
		    }
412
		}
412
		}

Return to bug 50193