aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/oscar
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-01-16 16:50:23 -0300
committerdequis <dx@dxzone.com.ar>2015-01-16 16:50:23 -0300
commit6b13103dad92d505e038c268af66aeb04b7b4d87 (patch)
tree42ea01f5040065df60917daca6605318ec4f28df /protocols/oscar
parent6f10697380c620065731a5beece95c0f5bd652a0 (diff)
Replace isdigit/isalpha/.../tolower/toupper with glib variants
This fixes warnings about passing signed chars to them (apparently they are implemented as macros that do array lookups without checks in some platforms, yay) Specifically: functions=isalnum|isalpha|isdigit|isspace|isxdigit|tolower|toupper sed -ir "s/$functions/g_ascii_&/g" **/*.c
Diffstat (limited to 'protocols/oscar')
-rw-r--r--protocols/oscar/auth.c2
-rw-r--r--protocols/oscar/oscar.c8
-rw-r--r--protocols/oscar/oscar_util.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/protocols/oscar/auth.c b/protocols/oscar/auth.c
index 0f7c8d0f..7a6b05d4 100644
--- a/protocols/oscar/auth.c
+++ b/protocols/oscar/auth.c
@@ -124,7 +124,7 @@ int aim_request_login(aim_session_t *sess, aim_conn_t *conn, const char *sn)
if (!sess || !conn || !sn)
return -EINVAL;
- if (isdigit(sn[0]) && set_getbool(&ic->acc->set, "old_icq_auth"))
+ if (g_ascii_isdigit(sn[0]) && set_getbool(&ic->acc->set, "old_icq_auth"))
return goddamnicq(sess, conn, sn);
sess->flags |= AIM_SESS_FLAGS_SNACLOGIN;
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c
index 7bf3ac3e..1c74e7a2 100644
--- a/protocols/oscar/oscar.c
+++ b/protocols/oscar/oscar.c
@@ -367,7 +367,7 @@ static gboolean oscar_login_connect(gpointer data, gint source, b_input_conditio
static void oscar_init(account_t *acc)
{
set_t *s;
- gboolean icq = isdigit(acc->user[0]);
+ gboolean icq = g_ascii_isdigit(acc->user[0]);
if (icq) {
set_add(&acc->set, "ignore_auth_requests", "false", set_eval_bool, acc);
@@ -393,7 +393,7 @@ static void oscar_login(account_t *acc) {
struct im_connection *ic = imcb_new(acc);
struct oscar_data *odata = ic->proto_data = g_new0(struct oscar_data, 1);
- if (isdigit(acc->user[0]))
+ if (g_ascii_isdigit(acc->user[0]))
odata->icq = TRUE;
else
ic->flags |= OPT_DOES_HTML;
@@ -2499,11 +2499,11 @@ struct groupchat *oscar_chat_with(struct im_connection * ic, char *who)
static int chat_id = 0;
char * chatname, *s;
- chatname = g_strdup_printf("%s%s%d", isdigit(*ic->acc->user) ? "icq" : "",
+ chatname = g_strdup_printf("%s%s%d", g_ascii_isdigit(*ic->acc->user) ? "icq" : "",
ic->acc->user, chat_id++);
for (s = chatname; *s; s ++)
- if (!isalnum(*s))
+ if (!g_ascii_isalnum(*s))
*s = '0';
ret = oscar_chat_join_internal(ic, chatname, NULL, NULL, 4);
diff --git a/protocols/oscar/oscar_util.c b/protocols/oscar/oscar_util.c
index 7d41d383..806632ff 100644
--- a/protocols/oscar/oscar_util.c
+++ b/protocols/oscar/oscar_util.c
@@ -56,7 +56,7 @@ int aim_sncmp(const char *sn1, const char *sn2)
if (*curPtr2 == ' ')
curPtr2++;
} else {
- if ( toupper(*curPtr1) != toupper(*curPtr2))
+ if ( g_ascii_toupper(*curPtr1) != g_ascii_toupper(*curPtr2))
return 1;
curPtr1++;
curPtr2++;