annotate plugins/icq/util.c @ 1525:ba8e6e211af5

[gaim-migrate @ 1535] icqlib updates. beginnings of system logging. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 03 Mar 2001 00:26:04 +0000
parents 4c510ca3563f
children 8ed70631ed15
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1152
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 /*
1432
4c510ca3563f [gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1309
diff changeset
3 $Id: util.c 1442 2001-01-28 01:52:27Z warmenhoven $
1152
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 $Log$
1432
4c510ca3563f [gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1309
diff changeset
5 Revision 1.3 2001/01/28 01:52:27 warmenhoven
4c510ca3563f [gaim-migrate @ 1442]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1309
diff changeset
6 icqlib 1.1.5
1309
0a766047b4fd [gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1152
diff changeset
7
0a766047b4fd [gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1152
diff changeset
8 Revision 1.33 2000/08/13 19:26:50 denis
0a766047b4fd [gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1152
diff changeset
9 icq_Genders[] array have been added.
1152
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 Revision 1.32 2000/07/22 16:49:32 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 Trinidad and Tobago country was added.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 Revision 1.31 2000/07/21 16:51:20 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 All languages, possible in original icq were added.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 Occupation array fixed.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 Revision 1.30 2000/07/20 09:58:59 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 Occupation table corrected to comply with original ICQ.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 Revision 1.29 2000/07/04 07:25:29 pcadach
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 icq_FmtLog() crashed when it receives NULL at link argument.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 Revision 1.28 2000/06/30 13:59:43 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 Slovak Republic country code fixed.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 Revision 1.27 2000/06/25 17:00:32 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28 icq_MetaOccupation[], icq_MetaPastBackgrounds[],
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29 icq_MetaAffiliations[] and icq_MetaLanguages[] arrays were added along
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 with icq_GetMetaOccupationName(), icq_GetMetaBackgroundName(),
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31 icq_GetMetaAffiliationName() and icq_GetMetaLanguageName() functions
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 to access them.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34 Revision 1.26 2000/05/21 17:42:51 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35 Bulgaria country code was added. Thanks to
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 "Napalm Death" <napalmbox@hotmail.com>
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38 Revision 1.25 2000/05/03 18:29:15 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
39 Callbacks have been moved to the ICQLINK structure.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
41 Revision 1.24 2000/04/10 16:36:04 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
42 Some more Win32 compatibility from Guillaume Rosanis <grs@mail.com>
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
43
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
44 Revision 1.23 2000/04/05 14:37:02 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
45 Applied patch from "Guillaume R." <grs@mail.com> for basic Win32
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
46 compatibility.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
47
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
48 Revision 1.22 2000/03/31 12:49:15 nofate
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
49 remove static variable
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
50
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
51 Revision 1.21 1999/11/11 15:10:33 guruz
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52 - Added Base for Webpager Messages. Please type "make fixme"
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
53 - Removed Segfault when kicq is started the first time
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
54
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
55 Revision 1.20 1999/10/07 18:01:40 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
56 Cleanups.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
57
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
58 Revision 1.19 1999/09/29 17:16:45 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
59 Cleanups.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
60
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
61 Revision 1.18 1999/07/18 20:24:27 bills
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
62 removed old byte order and contact list functions
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
63
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
64 Revision 1.17 1999/07/16 15:46:03 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
65 Cleaned up.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
66
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
67 Revision 1.16 1999/07/16 12:04:49 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
68 Status support changed.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
69
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
70 Revision 1.15 1999/07/12 15:13:46 cproch
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
71 - added definition of ICQLINK to hold session-specific global variabled
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
72 applications which have more than one connection are now possible
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
73 - changed nearly every function defintion to support ICQLINK parameter
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
74
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
75 Revision 1.14 1999/04/17 19:20:35 bills
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
76 removed *_link entries from icq_ContactItem, including cleanup/init code
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
77
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
78 Revision 1.13 1999/04/14 15:06:51 denis
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
79 Cleanups for "strict" compiling (-ansi -pedantic)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
80
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
81 */
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
82
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
83 #include <stdlib.h>
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
84 #include <ctype.h>
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
85
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
86 #ifndef _WIN32
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
87 #include <unistd.h>
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
88 #endif
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
89
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
90 #include "icqtypes.h"
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
91 #include "icq.h"
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
92 #include "icqlib.h"
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
93 #include "stdpackets.h"
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
94 #include "util.h"
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
95 #include "stdarg.h"
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
96
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
97 /*
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
98 * This list of countries should be sorted according to country code.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
99 * When adding new country, please preserve the order!
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
100 */
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
101 icq_ArrayType icq_Countries[] = {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
102 {"USA",1},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
103 {"Russia",7},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
104 {"Egypt",20},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
105 {"South Africa",27},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
106 {"Greece",30},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
107 {"Netherlands",31},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
108 {"Belgium",32},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
109 {"France",33},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
110 {"Monaco",33},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
111 {"Spain",34},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
112 {"Hungary",36},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
113 {"Yugoslavia",38},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
114 {"Italy",39},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
115 {"San Marino",39},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
116 {"Vatican City",39},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
117 {"Romania",40},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
118 {"Liechtenstein",41},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
119 {"Switzerland",41},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
120 {"Czech Republic",42},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
121 {"Austria",43},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
122 {"UK",44},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
123 {"Denmark",45},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
124 {"Sweden",46},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
125 {"Norway",47},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
126 {"Poland",48},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
127 {"Germany",49},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
128 {"Peru",51},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
129 {"Mexico",52},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
130 {"Guantanomo Bay",53},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
131 {"Argentina",54},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
132 {"Brazil",55},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
133 {"Chile",56},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
134 {"Columbia",57},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
135 {"Venezuela",58},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
136 {"Malaysia",60},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
137 {"Australia",61},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
138 {"Indonesia",62},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
139 {"Philippines",63},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
140 {"New Zealand",64},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
141 {"Singapore",65},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
142 {"Thailand",66},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
143 {"Japan",81},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
144 {"South Korea",82},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
145 {"Vietnam",84},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
146 {"China",86},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
147 {"Turkey",90},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
148 {"India",91},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
149 {"Pakistan",92},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
150 {"Sri Lanka",94},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
151 {"Iran",98},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
152 {"Canada",107},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
153 {"Morocco",212},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
154 {"Algeria",213},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
155 {"Tunisia",216},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
156 {"Libya",218},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
157 {"Senegal",221},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
158 {"Mali",223},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
159 {"Ivory Coast",225},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
160 {"Liberia",231},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
161 {"Ghana",233},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
162 {"Nigeria",234},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
163 {"Cameroon",237},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
164 {"Gabon",241},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
165 {"Zaire",243},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
166 {"Ethiopia",251},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
167 {"Kenya",254},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
168 {"Tanzania",255},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
169 {"Zimbabwe",263},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
170 {"Namibia",264},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
171 {"Malawi",265},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
172 {"Aruba",297},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
173 {"Portugal",351},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
174 {"Luxembourg",352},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
175 {"Ireland",353},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
176 {"Iceland",354},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
177 {"Malta",356},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
178 {"Cyprus",357},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
179 {"Finland",358},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
180 {"Bulgaria",359},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
181 {"Ukraine",380},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
182 {"Belize",501},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
183 {"Guatemala",502},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
184 {"El Salvador",503},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
185 {"Honduras",504},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
186 {"Nicaragua",505},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
187 {"Costa Rice",506},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
188 {"Panama",507},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
189 {"Haiti",509},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
190 {"Guadeloupe",590},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
191 {"Bolivia",591},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
192 {"Guyana",592},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
193 {"Ecuador",593},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
194 {"Paraguay",595},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
195 {"French Antilles",596},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
196 {"Suriname",597},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
197 {"Uruguay",598},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
198 {"Netherlands Antilles",599},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
199 {"Saipan",670},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
200 {"Saipan",670},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
201 {"Guam",671},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
202 {"Papua New Guinea",675},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
203 {"Fiji",679},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
204 {"American Samoa",684},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
205 {"New Caledonia",687},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
206 {"French Polynesia",689},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
207 {"Hong Kong",852},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
208 {"Trinidad and Tobago",868},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
209 {"Bangladesh",880},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
210 {"Taiwan",886},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
211 {"Jordan",962},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
212 {"Iraq",964},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
213 {"Kuwait",965},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
214 {"Saudia Arabia",966},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
215 {"Yemen",967},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
216 {"Oman",968},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
217 {"United Arab Emirates",971},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
218 {"Israel",972},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
219 {"Bahrain",973},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
220 {"Qatar",974},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
221 {"Nepal",977},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
222 {"Slovak Republic",4201},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
223 {"Not entered",0xffff},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
224 };
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
225
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
226 icq_ArrayType icq_MetaOccupation[] = {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
227 {"Academic", 1},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
228 {"Administrative", 2},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
229 {"Art/Entertainment", 3},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
230 {"College Student", 4},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
231 {"Computers", 5},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
232 {"Community & Social", 6},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
233 {"Education", 7},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
234 {"Engineering", 8},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
235 {"Financial Services", 9},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
236 {"Government", 10},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
237 {"High School Student", 11},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
238 {"Home", 12},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
239 {"ICQ - Providing Help", 13},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
240 {"Law", 14},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
241 {"Managerial", 15},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
242 {"Manufacturing", 16},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
243 {"Medical/Health", 17},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
244 {"Military", 18},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
245 {"Non-Government Organization", 19},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
246 {"Professional", 20},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
247 {"Retail", 21},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
248 {"Retired", 22},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
249 {"Science & Research", 23},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
250 {"Sports", 24},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
251 {"Technical", 25},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
252 {"University Student", 26},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
253 {"Web Building", 27},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
254 {"Other Services", 99},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
255 };
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
256
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
257 icq_ArrayType icq_MetaPastBackgrounds[] = {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
258 {"Elementary School", 300},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
259 {"High School", 301},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
260 {"College", 302},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
261 {"University", 303},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
262 {"Military", 304},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
263 {"Past Work Place", 305},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
264 {"Past Organization", 306},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
265 {"Other", 399},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
266 };
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
267
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
268 icq_ArrayType icq_MetaAffiliations[] = {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
269 {"Alumni Org.", 200},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
270 {"Charity Org.", 201},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
271 {"Club/Social Org.", 202},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
272 {"Community Org.", 203},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
273 {"Cultural Org.", 204},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
274 {"Fan Clubs", 205},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
275 {"Fraternity/Sorority", 206},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
276 {"Hobbyists Org.", 207},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
277 {"International Org.", 208},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
278 {"Nature and Environment Org.", 209},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
279 {"Professional Org.", 210},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
280 {"Scientific/Technical Org.", 211},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
281 {"Self Improvement Group", 212},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
282 {"Spiritual/Religious Org.", 213},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
283 {"Sports Org.", 214},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
284 {"Support Org.", 215},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
285 {"Trade and Business Org.", 216},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
286 {"Union", 217},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
287 {"Voluntary Org.", 218},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
288 {"Other", 299},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
289 };
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
290
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
291 icq_ArrayType icq_MetaLanguages[] = {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
292 {"Not Entered", 0},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
293 {"Arabic", 1},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
294 {"Bhojpuri", 2},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
295 {"Bulgarian", 3},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
296 {"Burmese", 4},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
297 {"Cantonese", 5},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
298 {"Catalan", 6},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
299 {"Chinese", 7},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
300 {"Croatian", 8},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
301 {"Czech", 9},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
302 {"Danish", 10},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
303 {"Dutch", 11},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
304 {"English", 12},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
305 {"Esperanto", 13},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
306 {"Estonian", 14},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
307 {"Farsi", 15},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
308 {"Finnish", 16},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
309 {"French", 17},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
310 {"Gaelic", 18},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
311 {"German", 19},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
312 {"Greek", 20},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
313 {"Hebrew", 21},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
314 {"Hindi", 22},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
315 {"Hungarian", 23},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
316 {"Icelandic", 24},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
317 {"Indonesian", 25},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
318 {"Italian", 26},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
319 {"Japanese", 27},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
320 {"Khmer", 28},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
321 {"Korean", 29},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
322 {"Lao", 30},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
323 {"Latvian", 31},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
324 {"Lithuanian", 32},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
325 {"Malay", 33},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
326 {"Norwegian", 34},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
327 {"Polish", 35},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
328 {"Portuguese", 36},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
329 {"Romanian", 37},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
330 {"Russian", 38},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
331 {"Serbian", 39},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
332 {"Slovak", 40},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
333 {"Slovenian", 41},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
334 {"Somali", 42},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
335 {"Spanish", 43},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
336 {"Swahili", 44},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
337 {"Swedish", 45},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
338 {"Tagalog", 46},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
339 {"Tatar", 47},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
340 {"Thai", 48},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
341 {"Turkish", 49},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
342 {"Ukrainian", 50},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
343 {"Urdu", 51},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
344 {"Vietnamese", 52},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
345 {"Yiddish", 53},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
346 {"Yoruba", 54},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
347 {"Afrikaans", 55},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
348 {"Bosnian", 56},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
349 {"Persian", 57},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
350 {"Albanian", 58},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
351 {"Armenian", 59},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
352 {"Punjabi", 60},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
353 {"Chamorro", 61},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
354 {"Mongolian", 62},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
355 {"Mandarin", 63},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
356 {"Taiwaness", 64},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
357 {"Macedonian", 65},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
358 {"Sindhi", 66},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
359 {"Welsh", 67},
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
360 };
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
361
1309
0a766047b4fd [gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1152
diff changeset
362 icq_ArrayType icq_Genders[] = {
0a766047b4fd [gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1152
diff changeset
363 {"Not Specified", 0},
0a766047b4fd [gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1152
diff changeset
364 {"Female", 1},
0a766047b4fd [gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1152
diff changeset
365 {"Male", 2},
0a766047b4fd [gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1152
diff changeset
366 };
0a766047b4fd [gaim-migrate @ 1319]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1152
diff changeset
367
1152
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
368 void hex_dump(char *data, long size)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
369 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
370 long i;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
371 long x;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
372 int r=1;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
373 char d[32];
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
374 unsigned char bfr[64];
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
375 for(i=0, x=0;;i++)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
376 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
377 if(i<size)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
378 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
379 if(x==0)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
380 printf("%04lx: ", i);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
381 #ifdef _WIN32
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
382 sprintf(d, "%08x", data[i]);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
383 #else
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
384 snprintf(d, 9, "%08x", data[i]);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
385 #endif
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
386 printf("%c%c ", d[6], d[7]);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
387 bfr[x]=data[i];
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
388 if(bfr[x]<0x20)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
389 bfr[x]='.';
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
390 if(bfr[x]>0x7f)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
391 bfr[x]='.';
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
392 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
393 else
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
394 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
395 if(x==0)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
396 break;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
397 else
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
398 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
399 printf(" ");
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
400 bfr[x]=' ';
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
401 r=0;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
402 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
403 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
404 x++;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
405 if(!(x<16))
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
406 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
407 bfr[x]=0;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
408 printf("%s\n", bfr);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
409 x=0;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
410 if(!r)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
411 break;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
412 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
413 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
414 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
415
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
416 /* simple mapping for udp status->tcp status translation function */
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
417 struct icq_TCPStatusRec
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
418 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
419 unsigned long udp_status;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
420 long tcp_status;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
421 } icq_TCPStatusMap[] = {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
422 { STATUS_OFFLINE , 0 },
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
423 { STATUS_ONLINE , ICQ_TCP_STATUS_ONLINE },
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
424 { STATUS_INVISIBLE , ICQ_TCP_STATUS_INVISIBLE },
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
425 { STATUS_NA , ICQ_TCP_STATUS_NA },
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
426 { STATUS_FREE_CHAT , ICQ_TCP_STATUS_FREE_CHAT },
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
427 { STATUS_OCCUPIED , ICQ_TCP_STATUS_OCCUPIED },
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
428 { STATUS_AWAY , ICQ_TCP_STATUS_AWAY },
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
429 { STATUS_DND , ICQ_TCP_STATUS_DND },
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
430 };
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
431
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
432 long icq_TCPXlateStatus(unsigned long udp_status)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
433 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
434 unsigned int i;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
435 for(i=0;i<sizeof(icq_TCPStatusMap)/sizeof(struct icq_TCPStatusRec);i++)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
436 if(icq_TCPStatusMap[i].udp_status==udp_status)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
437 return icq_TCPStatusMap[i].tcp_status;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
438 /* warning: "couldn't find tcp status for %d, assuming 0", udp_status */
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
439 return 0;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
440 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
441
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
442 void icq_FmtLog(ICQLINK *link, int level, const char *fmt, ...)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
443 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
444 char buffer[2048];
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
445 va_list ap;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
446 va_start(ap, fmt);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
447
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
448 if(!link)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
449 return;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
450 #ifdef _MSVC_
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
451 _vsnprintf(buffer, 1024, fmt, ap);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
452 #else
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
453 (void)vsnprintf(buffer, 1024, fmt, ap);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
454 #endif
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
455 va_end(ap);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
456
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
457 if(link->icq_Log && icq_LogLevel>=level)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
458 (*link->icq_Log)(link, time(0L), level, buffer);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
459 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
460
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
461 /**
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
462 * Following functions used by qsort and bsearch to
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
463 * compare 2 pointers to icq_ArrayType object.
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
464 */
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
465 int array_code_compare(const void *x, const void *y)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
466 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
467 return ((icq_ArrayType*)x)->code - ((icq_ArrayType*)y)->code;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
468 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
469
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
470 const char *icq_GetCountryName(unsigned short code)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
471 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
472 icq_ArrayType *res,key;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
473
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
474 key.code=code;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
475 res=bsearch(&key, icq_Countries, sizeof(icq_Countries)/sizeof(icq_ArrayType),
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
476 sizeof(icq_ArrayType), array_code_compare);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
477
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
478 return res?res->name:"Unknown";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
479 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
480
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
481 const char *icq_GetMetaOccupationName(unsigned short code)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
482 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
483 icq_ArrayType *res,key;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
484
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
485 key.code=code;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
486 res=bsearch(&key, icq_MetaOccupation, sizeof(icq_MetaOccupation)/sizeof(icq_ArrayType),
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
487 sizeof(icq_ArrayType), array_code_compare);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
488
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
489 return res?res->name:"Unknown";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
490 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
491
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
492 const char *icq_GetMetaBackgroundName(unsigned short code)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
493 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
494 icq_ArrayType *res,key;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
495
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
496 key.code=code;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
497 res=bsearch(&key, icq_MetaPastBackgrounds, sizeof(icq_MetaPastBackgrounds)/sizeof(icq_ArrayType),
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
498 sizeof(icq_ArrayType), array_code_compare);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
499
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
500 return res?res->name:"Unknown";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
501 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
502
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
503 const char *icq_GetMetaAffiliationName(unsigned short code)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
504 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
505 icq_ArrayType *res,key;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
506
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
507 key.code=code;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
508 res=bsearch(&key, icq_MetaAffiliations, sizeof(icq_MetaAffiliations)/sizeof(icq_ArrayType),
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
509 sizeof(icq_ArrayType), array_code_compare);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
510
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
511 return res?res->name:"Unknown";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
512 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
513
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
514 const char *icq_GetMetaLanguageName(unsigned short code)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
515 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
516 icq_ArrayType *res,key;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
517
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
518 key.code=code;
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
519 res=bsearch(&key, icq_MetaLanguages, sizeof(icq_MetaLanguages)/sizeof(icq_ArrayType),
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
520 sizeof(icq_ArrayType), array_code_compare);
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
521
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
522 return res?res->name:"Unknown";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
523 }
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
524
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
525 /********************************************
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
526 returns a string describing the status or
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
527 a "Error" if no such string exists
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
528 *********************************************/
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
529 const char *icq_ConvertStatus2Str(unsigned long status)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
530 {
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
531 if((unsigned long)STATUS_OFFLINE == status) /* this because -1 & 0x01FF is not -1 */
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
532 return "Offline";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
533
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
534 if((status & STATUS_INVISIBLE) == STATUS_INVISIBLE)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
535 return "Invisible";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
536 else if((status & STATUS_FREE_CHAT) == STATUS_FREE_CHAT)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
537 return "Free for chat";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
538 else if((status & STATUS_DND) == STATUS_DND)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
539 return "Do not disturb";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
540 else if((status & STATUS_OCCUPIED) == STATUS_OCCUPIED)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
541 return "Occupied";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
542 else if((status & STATUS_NA) == STATUS_NA)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
543 return "Not available";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
544 else if((status & STATUS_AWAY) == STATUS_AWAY)
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
545 return "Away";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
546 else if(!(status & 0x01FF))
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
547 return "Online";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
548 else
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
549 return "Error";
201ec77f3a60 [gaim-migrate @ 1162]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
550 }