# HG changeset patch # User Nick Hebner # Date 1183253102 0 # Node ID e122b631a657bf5b73c787ee21b07b6d718bfe6d # Parent 864c454a5e16550915b9cf7a61c6c66c0d4f0418 Replace some strncasecmp() calls with g_ascii_strncasecmp() as part of the effort to make libpurple compile with Visual Studio. --rlaager committer: Richard Laager diff -r 864c454a5e16 -r e122b631a657 libpurple/util.c --- a/libpurple/util.c Sun Jul 01 01:15:09 2007 +0000 +++ b/libpurple/util.c Sun Jul 01 01:25:02 2007 +0000 @@ -1730,7 +1730,7 @@ if (cdata_close_tag) { /* Note: Don't even assume any other tag is a tag in CDATA */ - if (strncasecmp(str2 + i, cdata_close_tag, + if (g_ascii_strncasecmp(str2 + i, cdata_close_tag, strlen(cdata_close_tag)) == 0) { i += strlen(cdata_close_tag) - 1; @@ -1738,12 +1738,12 @@ } continue; } - else if (strncasecmp(str2 + i, "", 5) == 0) + else if (g_ascii_strncasecmp(str2 + i, "", 5) == 0) { closing_td_p = TRUE; visible = FALSE; @@ -1771,7 +1771,7 @@ /* If we've got an tag with an href, save the address * to print later. */ - if (strncasecmp(str2 + i, " with an ascii representation of the * address the link was pointing to. */ - else if (href != NULL && strncasecmp(str2 + i, "", 4) == 0) + else if (href != NULL && g_ascii_strncasecmp(str2 + i, "", 4) == 0) { size_t hrlen = strlen(href); @@ -1834,29 +1834,29 @@ } /* Check for tags which should be mapped to newline */ - else if (strncasecmp(str2 + i, "

", 3) == 0 - || strncasecmp(str2 + i, "", 8) == 0) + else if (g_ascii_strncasecmp(str2 + i, "

", 3) == 0 + || g_ascii_strncasecmp(str2 + i, "", 8) == 0) { str2[j++] = '\n'; } /* Check for tags which begin CDATA and need to be closed */ #if 0 /* FIXME.. option is end tag optional, we can't handle this right now */ - else if (strncasecmp(str2 + i, "