# HG changeset patch # User Evan Schoenberg # Date 1139341814 0 # Node ID bdb8d7beb5a7047c9fcdee259f8d497bf4040d74 # Parent be0cd152691d7f31088029e537c4b7991c22c692 [gaim-migrate @ 15531] Sorry about that; the build bot is pickier than the static libgaim compilation I tested this on. I'll be sure to compile Gaim proper before committing in the future. committer: Tailor Script diff -r be0cd152691d -r bdb8d7beb5a7 src/protocols/oscar/aim.h --- a/src/protocols/oscar/aim.h Tue Feb 07 19:36:40 2006 +0000 +++ b/src/protocols/oscar/aim.h Tue Feb 07 19:50:14 2006 +0000 @@ -1569,6 +1569,7 @@ faim_export int aim_snvalid(const char *sn); faim_export int aim_sn_is_icq(const char *sn); +faim_export int aim_sn_is_sms(const char *sn); faim_export int aim_snlen(const char *sn); faim_export int aim_sncmp(const char *sn1, const char *sn2); diff -r be0cd152691d -r bdb8d7beb5a7 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Tue Feb 07 19:36:40 2006 +0000 +++ b/src/protocols/oscar/oscar.c Tue Feb 07 19:50:14 2006 +0000 @@ -6526,7 +6526,7 @@ /* * If we're IMing an SMS user or an ICQ user from an ICQ account, then strip HTML. */ - if (aim_snvalid_sms(name)) { + if (aim_sn_is_sms(name)) { /* Messaging an SMS (mobile) user */ tmp2 = gaim_unescape_html(tmp1); } else if (aim_sn_is_icq(gaim_account_get_username(account))) { diff -r be0cd152691d -r bdb8d7beb5a7 src/protocols/oscar/util.c --- a/src/protocols/oscar/util.c Tue Feb 07 19:36:40 2006 +0000 +++ b/src/protocols/oscar/util.c Tue Feb 07 19:50:14 2006 +0000 @@ -218,6 +218,21 @@ return 1; } +/** + * Determine if a given screen name is an SMS number + * (i.e. it begins with a +). + * + * @sn A valid AIM or ICQ screen name. + * @return 1 if the screen name is an SMS number. Otherwise 0 + * is returned. + */ +faim_export int aim_sn_is_sms(const char *sn) +{ + if (sn[0] != '+') + return 0; + return 1; +} + /* * int snlen(const char *) *