Mercurial > pidgin
comparison libpurple/protocols/qq/utils.c @ 31191:4deef745de87
2010.01.23 - flos <lonicerae(at)gmail.com>
* added an option to force incoming message in chat room to use a default font instead of the font in message itself
2010.01.18 - flos <lonicerae(at)gmail.com>
* added type 'UPDCLS' and 'UID' for implementing business logic layer
2010.01.13 - ccpaging <ccpaging(at)gmail.com>
* qq2009-1 patch from ccpaging
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Sun, 06 Feb 2011 05:23:22 +0000 |
parents | f1437342cc0e |
children |
comparison
equal
deleted
inserted
replaced
31190:f0e6aaf942f8 | 31191:4deef745de87 |
---|---|
129 | 129 |
130 return segments; | 130 return segments; |
131 } | 131 } |
132 | 132 |
133 /* convert Purple name to original QQ UID */ | 133 /* convert Purple name to original QQ UID */ |
134 guint32 purple_name_to_uid(const gchar *const name) | 134 UID purple_name_to_uid(const gchar *const name) |
135 { | 135 { |
136 guint32 ret; | 136 UID ret; |
137 g_return_val_if_fail(name != NULL, 0); | 137 g_return_val_if_fail(name != NULL, 0); |
138 | 138 |
139 ret = strtoul(name, NULL, 10); | 139 ret = strtoul(name, NULL, 10); |
140 if (errno == ERANGE) | 140 if (errno == ERANGE) |
141 return 0; | 141 return 0; |
166 return ip; | 166 return ip; |
167 } | 167 } |
168 | 168 |
169 /* convert a QQ UID to a unique name of Purple | 169 /* convert a QQ UID to a unique name of Purple |
170 * the return needs to be freed */ | 170 * the return needs to be freed */ |
171 gchar *uid_to_purple_name(guint32 uid) | 171 gchar *uid_to_purple_name(UID uid) |
172 { | 172 { |
173 return g_strdup_printf("%u", uid); | 173 return g_strdup_printf("%u", uid); |
174 } | 174 } |
175 | 175 |
176 /* try to dump the data as GBK */ | 176 /* try to dump the data as GBK */ |