Mercurial > pidgin
comparison src/util.c @ 7000:9d038cc7e825
[gaim-migrate @ 7556]
forgot this
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 28 Sep 2003 23:54:14 +0000 |
parents | 083d1e4a9c78 |
children | acd2a66e59ed |
comparison
equal
deleted
inserted
replaced
6999:aeea0debeafe | 7000:9d038cc7e825 |
---|---|
914 gint gaim_utf8_strcasecmp(const gchar *a, const gchar *b) { | 914 gint gaim_utf8_strcasecmp(const gchar *a, const gchar *b) { |
915 gchar *a_norm=NULL; | 915 gchar *a_norm=NULL; |
916 gchar *b_norm=NULL; | 916 gchar *b_norm=NULL; |
917 gint ret=-1; | 917 gint ret=-1; |
918 | 918 |
919 if(!a && b) | |
920 return -1; | |
921 else if(!b && a) | |
922 return 1; | |
923 else if(!a && !b) | |
924 return 0; | |
925 | |
919 if(!g_utf8_validate(a, -1, NULL) || !g_utf8_validate(b, -1, NULL)) { | 926 if(!g_utf8_validate(a, -1, NULL) || !g_utf8_validate(b, -1, NULL)) { |
920 gaim_debug(GAIM_DEBUG_ERROR, "gaim_utf8_strcasecmp", "One or both parameters are invalid UTF8\n"); | 927 gaim_debug(GAIM_DEBUG_ERROR, "gaim_utf8_strcasecmp", "One or both parameters are invalid UTF8\n"); |
921 return ret; | 928 return ret; |
922 } | 929 } |
923 | 930 |