1 diff -Naur xchat-2.8.8-orig/src/common/cfgfiles.c xchat-2.8.8/src/common/cfgfiles.c
2 --- xchat-2.8.8-orig/src/common/cfgfiles.c 2010-07-17 02:48:27.851390501 +0300
3 +++ xchat-2.8.8/src/common/cfgfiles.c 2010-07-17 02:53:03.341352157 +0300
8 - if (!strncasecmp (buf, "NAME ", 5))
9 + if (!g_ascii_strncasecmp (buf, "NAME ", 5))
11 safe_strcpy (name, buf + 5, sizeof (name));
13 - else if (!strncasecmp (buf, "CMD ", 4))
14 + else if (!g_ascii_strncasecmp (buf, "CMD ", 4))
16 safe_strcpy (cmd, buf + 4, sizeof (cmd));
21 pop = (struct popup *) alist->data;
22 - if (!strcasecmp (name, pop->name))
23 + if (!g_ascii_strcasecmp (name, pop->name))
25 *list = g_slist_remove (*list, pop);
31 - if (!strncasecmp (var, cfg, strlen (var)))
32 + if (!g_ascii_strncasecmp (var, cfg, strlen (var)))
40 - if (!strcasecmp (var, vars[i].name))
41 + if (!g_ascii_strcasecmp (var, vars[i].name))
43 return *((int *) &prefs + vars[i].offset);
49 - if (strcasecmp (word[2], "-e") == 0)
50 + if (g_ascii_strcasecmp (word[2], "-e") == 0)
57 - if (strcasecmp (word[idx], "-off") == 0)
58 + if (g_ascii_strcasecmp (word[idx], "-off") == 0)
65 - if (strcasecmp (word[idx], "-or") == 0 || strcasecmp (word[idx], "-on") == 0)
66 + if (g_ascii_strcasecmp (word[idx], "-or") == 0 || g_ascii_strcasecmp (word[idx], "-on") == 0)
72 - if (strcasecmp (word[idx], "-quiet") == 0)
73 + if (g_ascii_strcasecmp (word[idx], "-quiet") == 0)
79 found = !match (var, vars[i].name);
81 - found = strcasecmp (var, vars[i].name);
82 + found = g_ascii_strcasecmp (var, vars[i].name);
87 *((int *) &prefs + vars[i].offset) = 1;
89 *((int *) &prefs + vars[i].offset) = 0;
90 - if (!strcasecmp (val, "YES") || !strcasecmp (val, "ON"))
91 + if (!g_ascii_strcasecmp (val, "YES") || !g_ascii_strcasecmp (val, "ON"))
92 *((int *) &prefs + vars[i].offset) = 1;
93 - if (!strcasecmp (val, "NO") || !strcasecmp (val, "OFF"))
94 + if (!g_ascii_strcasecmp (val, "NO") || !g_ascii_strcasecmp (val, "OFF"))
95 *((int *) &prefs + vars[i].offset) = 0;
98 diff -Naur xchat-2.8.8-orig/src/common/chanopt.c xchat-2.8.8/src/common/chanopt.c
99 --- xchat-2.8.8-orig/src/common/chanopt.c 2010-07-17 02:48:27.854723764 +0300
100 +++ xchat-2.8.8/src/common/chanopt.c 2010-07-17 02:53:03.344695757 +0300
105 - if (!strcasecmp (word[offset], "ON"))
106 + if (!g_ascii_strcasecmp (word[offset], "ON"))
108 - else if (!strcasecmp (word[offset], "OFF"))
109 + else if (!g_ascii_strcasecmp (word[offset], "OFF"))
111 else if (word[offset][0] == 'u')
112 newval = SET_DEFAULT;
114 for (list = chanopt_list; list; list = list->next)
117 - if (!strcasecmp (co->channel, channel) &&
118 - !strcasecmp (co->network, network))
119 + if (!g_ascii_strcasecmp (co->channel, channel) &&
120 + !g_ascii_strcasecmp (co->network, network))
124 diff -Naur xchat-2.8.8-orig/src/common/ctcp.c xchat-2.8.8/src/common/ctcp.c
125 --- xchat-2.8.8-orig/src/common/ctcp.c 2010-07-17 02:48:27.854723764 +0300
126 +++ xchat-2.8.8/src/common/ctcp.c 2010-07-17 02:53:03.344695757 +0300
130 pop = (struct popup *) list->data;
131 - if (!strcasecmp (ctcp, pop->name))
132 + if (!g_ascii_strcasecmp (ctcp, pop->name))
134 ctcp_reply (sess, nick, word, word_eol, pop->cmd);
139 /* consider DCC to be different from other CTCPs */
140 - if (!strncasecmp (msg, "DCC", 3))
141 + if (!g_ascii_strncasecmp (msg, "DCC", 3))
143 /* but still let CTCP replies override it */
144 if (!ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset))
147 /* consider ACTION to be different from other CTCPs. Check
148 ignore as if it was a PRIV/CHAN. */
149 - if (!strncasecmp (msg, "ACTION ", 7))
150 + if (!g_ascii_strncasecmp (msg, "ACTION ", 7))
152 if (is_channel (serv, to))
155 if (ignore_check (word[1], IG_CTCP))
158 - if (!strcasecmp (msg, "VERSION") && !prefs.hidever)
159 + if (!g_ascii_strcasecmp (msg, "VERSION") && !prefs.hidever)
161 snprintf (outbuf, sizeof (outbuf), "VERSION xchat "PACKAGE_VERSION" %s",
165 if (!ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset))
167 - if (!strncasecmp (msg, "SOUND", 5))
168 + if (!g_ascii_strncasecmp (msg, "SOUND", 5))
170 po = strchr (word[5], '\001');
172 diff -Naur xchat-2.8.8-orig/src/common/dcc.c xchat-2.8.8/src/common/dcc.c
173 --- xchat-2.8.8-orig/src/common/dcc.c 2010-07-17 02:48:27.851390501 +0300
174 +++ xchat-2.8.8/src/common/dcc.c 2010-07-17 02:53:03.354685629 +0300
177 url_check_line (line, len);
179 - if (line[0] == 1 && !strncasecmp (line + 1, "ACTION", 6))
180 + if (line[0] == 1 && !g_ascii_strncasecmp (line + 1, "ACTION", 6))
182 po = strchr (line + 8, '\001');
184 @@ -1936,9 +1936,9 @@
188 - if (!strcasecmp (file, file_part (dcc->file)))
189 + if (!g_ascii_strcasecmp (file, file_part (dcc->file)))
191 - if (!strcasecmp (file, dcc->file))
192 + if (!g_ascii_strcasecmp (file, dcc->file))
196 @@ -2402,7 +2402,7 @@
200 - if (!strcasecmp (type, "CHAT"))
201 + if (!g_ascii_strcasecmp (type, "CHAT"))
203 port = atoi (word[8]);
204 addr = strtoul (word[7], NULL, 10);
205 @@ -2449,7 +2449,7 @@
209 - if (!strcasecmp (type, "Resume"))
210 + if (!g_ascii_strcasecmp (type, "Resume"))
212 port = atoi (word[7]);
214 @@ -2493,7 +2493,7 @@
218 - if (!strcasecmp (type, "Accept"))
219 + if (!g_ascii_strcasecmp (type, "Accept"))
221 port = atoi (word[7]);
222 dcc = find_dcc_from_port (port, TYPE_RECV);
223 @@ -2503,7 +2503,7 @@
227 - if (!strcasecmp (type, "SEND"))
228 + if (!g_ascii_strcasecmp (type, "SEND"))
230 char *file = file_part (word[6]);
232 diff -Naur xchat-2.8.8-orig/src/common/inbound.c xchat-2.8.8/src/common/inbound.c
233 --- xchat-2.8.8-orig/src/common/inbound.c 2010-07-17 02:48:27.851390501 +0300
234 +++ xchat-2.8.8/src/common/inbound.c 2010-07-17 02:53:03.364685631 +0300
236 if (msg[0] == '[' && (!serv->have_idmsg || id))
238 /* guess where chanserv meant to post this -sigh- */
239 - if (!strcasecmp (nick, "ChanServ") && !find_dialog (serv, nick))
240 + if (!g_ascii_strcasecmp (nick, "ChanServ") && !find_dialog (serv, nick))
242 char *dest = strdup (msg + 1);
243 char *end = strchr (dest, ']');
244 diff -Naur xchat-2.8.8-orig/src/common/modes.c xchat-2.8.8/src/common/modes.c
245 --- xchat-2.8.8-orig/src/common/modes.c 2010-07-17 02:48:27.851390501 +0300
246 +++ xchat-2.8.8/src/common/modes.c 2010-07-17 02:53:03.371351179 +0300
247 @@ -789,20 +789,20 @@
251 - if (strcasecmp (word[w] + 8, "RusNet") == 0)
252 + if (g_ascii_strcasecmp (word[w] + 8, "RusNet") == 0)
253 serv->nickservtype = 1;
254 - else if (strcasecmp (word[w] + 8, "UniBG") == 0)
255 + else if (g_ascii_strcasecmp (word[w] + 8, "UniBG") == 0)
256 serv->nickservtype = 3;
257 - else if (strcasecmp (word[w] + 8, "QuakeNet") == 0)
258 + else if (g_ascii_strcasecmp (word[w] + 8, "QuakeNet") == 0)
259 serv->nickservtype = 4;
261 } else if (strncmp (word[w], "CASEMAPPING=", 12) == 0)
263 if (strcmp (word[w] + 12, "ascii") == 0) /* bahamut */
264 - serv->p_cmp = (void *)strcasecmp;
265 + serv->p_cmp = (void *)g_ascii_strcasecmp;
266 } else if (strncmp (word[w], "CHARSET=", 8) == 0)
268 - if (strcasecmp (word[w] + 8, "UTF-8") == 0)
269 + if (g_ascii_strcasecmp (word[w] + 8, "UTF-8") == 0)
271 server_set_encoding (serv, "UTF-8");
273 diff -Naur xchat-2.8.8-orig/src/common/outbound.c xchat-2.8.8/src/common/outbound.c
274 --- xchat-2.8.8-orig/src/common/outbound.c 2010-07-17 02:48:27.854723764 +0300
275 +++ xchat-2.8.8/src/common/outbound.c 2010-07-17 02:53:03.394684653 +0300
276 @@ -617,13 +617,13 @@
277 GSList *list = sess_list;
278 char *reason = word_eol[2];
280 - if (strcasecmp (reason, "HISTORY") == 0)
281 + if (g_ascii_strcasecmp (reason, "HISTORY") == 0)
283 history_free (&sess->history);
287 - if (strncasecmp (reason, "all", 3) == 0)
288 + if (g_ascii_strncasecmp (reason, "all", 3) == 0)
292 @@ -750,26 +750,26 @@
293 char *type = word[2];
296 - if (!strcasecmp (type, "HELP"))
297 + if (!g_ascii_strcasecmp (type, "HELP"))
299 - if (!strcasecmp (type, "CLOSE"))
300 + if (!g_ascii_strcasecmp (type, "CLOSE"))
302 if (*word[3] && *word[4])
305 - if (!strcasecmp (word[3], "SEND"))
306 + if (!g_ascii_strcasecmp (word[3], "SEND"))
308 dcc = find_dcc (word[4], word[5], TYPE_SEND);
309 dcc_abort (sess, dcc);
312 - if (!strcasecmp (word[3], "GET"))
313 + if (!g_ascii_strcasecmp (word[3], "GET"))
315 dcc = find_dcc (word[4], word[5], TYPE_RECV);
316 dcc_abort (sess, dcc);
319 - if (!strcasecmp (word[3], "CHAT"))
320 + if (!g_ascii_strcasecmp (word[3], "CHAT"))
322 dcc = find_dcc (word[4], "", TYPE_CHATRECV);
324 @@ -789,20 +789,20 @@
328 - if ((!strcasecmp (type, "CHAT")) || (!strcasecmp (type, "PCHAT")))
329 + if ((!g_ascii_strcasecmp (type, "CHAT")) || (!g_ascii_strcasecmp (type, "PCHAT")))
331 char *nick = word[3];
332 - int passive = (!strcasecmp(type, "PCHAT")) ? 1 : 0;
333 + int passive = (!g_ascii_strcasecmp(type, "PCHAT")) ? 1 : 0;
335 dcc_chat (sess, nick, passive);
338 - if (!strcasecmp (type, "LIST"))
339 + if (!g_ascii_strcasecmp (type, "LIST"))
341 dcc_show_list (sess);
344 - if (!strcasecmp (type, "GET"))
345 + if (!g_ascii_strcasecmp (type, "GET"))
347 char *nick = word[3];
348 char *file = word[4];
349 @@ -820,18 +820,18 @@
353 - if ((!strcasecmp (type, "SEND")) || (!strcasecmp (type, "PSEND")))
354 + if ((!g_ascii_strcasecmp (type, "SEND")) || (!g_ascii_strcasecmp (type, "PSEND")))
358 - int passive = (!strcasecmp(type, "PSEND")) ? 1 : 0;
359 + int passive = (!g_ascii_strcasecmp(type, "PSEND")) ? 1 : 0;
365 maxcps = prefs.dcc_max_send_cps;
366 - if (!strncasecmp(nick, "-maxcps=", 8))
367 + if (!g_ascii_strncasecmp(nick, "-maxcps=", 8))
369 maxcps = atoi(nick + 8);
371 @@ -1312,7 +1312,7 @@
375 - if (!strcasecmp (word[idx], "ADD"))
376 + if (!g_ascii_strcasecmp (word[idx], "ADD"))
380 @@ -1327,7 +1327,7 @@
384 - if (!strcasecmp (word[idx], "DEL"))
385 + if (!g_ascii_strcasecmp (word[idx], "DEL"))
387 menu_del (tbuf, label);
389 @@ -2045,7 +2045,7 @@
390 case 0xc0851aaa: fe_message (word[3], FE_MSG_INFO|FE_MSG_MARKUP); break; /* MSGBOX */
391 case 0x0035dafd: fe_ctrl_gui (sess, 1, 0); break; /* SHOW */
392 case 0x0033155f: /* MENU */
393 - if (!strcasecmp (word[3], "TOGGLE"))
394 + if (!g_ascii_strcasecmp (word[3], "TOGGLE"))
395 fe_ctrl_gui (sess, 6, 0);
398 @@ -2247,25 +2247,25 @@
402 - if (!strcasecmp (word[i], "UNIGNORE"))
403 + if (!g_ascii_strcasecmp (word[i], "UNIGNORE"))
405 - else if (!strcasecmp (word[i], "ALL"))
406 + else if (!g_ascii_strcasecmp (word[i], "ALL"))
407 type |= IG_PRIV | IG_NOTI | IG_CHAN | IG_CTCP | IG_INVI | IG_DCC;
408 - else if (!strcasecmp (word[i], "PRIV"))
409 + else if (!g_ascii_strcasecmp (word[i], "PRIV"))
411 - else if (!strcasecmp (word[i], "NOTI"))
412 + else if (!g_ascii_strcasecmp (word[i], "NOTI"))
414 - else if (!strcasecmp (word[i], "CHAN"))
415 + else if (!g_ascii_strcasecmp (word[i], "CHAN"))
417 - else if (!strcasecmp (word[i], "CTCP"))
418 + else if (!g_ascii_strcasecmp (word[i], "CTCP"))
420 - else if (!strcasecmp (word[i], "INVI"))
421 + else if (!g_ascii_strcasecmp (word[i], "INVI"))
423 - else if (!strcasecmp (word[i], "QUIET"))
424 + else if (!g_ascii_strcasecmp (word[i], "QUIET"))
426 - else if (!strcasecmp (word[i], "NOSAVE"))
427 + else if (!g_ascii_strcasecmp (word[i], "NOSAVE"))
429 - else if (!strcasecmp (word[i], "DCC"))
430 + else if (!g_ascii_strcasecmp (word[i], "DCC"))
434 @@ -2456,12 +2456,12 @@
436 len = strlen (word[2]);
438 - if (len > 4 && strcasecmp (".dll", word[2] + len - 4) == 0)
439 + if (len > 4 && g_ascii_strcasecmp (".dll", word[2] + len - 4) == 0)
442 - if (len > 3 && strcasecmp (".sl", word[2] + len - 3) == 0)
443 + if (len > 3 && g_ascii_strcasecmp (".sl", word[2] + len - 3) == 0)
445 - if (len > 3 && strcasecmp (".so", word[2] + len - 3) == 0)
446 + if (len > 3 && g_ascii_strcasecmp (".so", word[2] + len - 3) == 0)
450 @@ -2613,8 +2613,8 @@
453 /* mask out passwords */
454 - if (strcasecmp (nick, "nickserv") == 0 &&
455 - strncasecmp (msg, "identify ", 9) == 0)
456 + if (g_ascii_strcasecmp (nick, "nickserv") == 0 &&
457 + g_ascii_strncasecmp (msg, "identify ", 9) == 0)
458 msg = "identify ****";
459 EMIT_SIGNAL (XP_TE_MSGSEND, sess, nick, msg, NULL, NULL, 0);
461 @@ -2825,7 +2825,7 @@
463 prefs.recon_delay = 0;
465 - if (!strcasecmp (word[2], "ALL"))
466 + if (!g_ascii_strcasecmp (word[2], "ALL"))
470 @@ -2980,7 +2980,7 @@
474 - if (strncasecmp ("ircs://", url, 7) == 0)
475 + if (g_ascii_strncasecmp ("ircs://", url, 7) == 0)
478 *server_name = url + 7;
479 @@ -2988,7 +2988,7 @@
483 - if (strncasecmp ("irc://", url, 6) == 0)
484 + if (g_ascii_strncasecmp ("irc://", url, 6) == 0)
486 *server_name = url + 6;
488 @@ -3059,7 +3059,7 @@
489 sess->server->network = NULL;
491 /* dont clear it for /servchan */
492 - if (strncasecmp (word_eol[1], "SERVCHAN ", 9))
493 + if (g_ascii_strncasecmp (word_eol[1], "SERVCHAN ", 9))
494 sess->willjoinchannel[0] = 0;
497 @@ -3189,7 +3189,7 @@
499 if (ignore_del (mask, NULL))
501 - if (strcasecmp (arg, "QUIET"))
502 + if (g_ascii_strcasecmp (arg, "QUIET"))
503 EMIT_SIGNAL (XP_TE_IGNOREREMOVE, sess, mask, NULL, NULL, NULL, 0);
506 @@ -3205,12 +3205,12 @@
508 len = strlen (word[2]);
510 - if (len > 4 && strcasecmp (word[2] + len - 4, ".dll") == 0)
511 + if (len > 4 && g_ascii_strcasecmp (word[2] + len - 4, ".dll") == 0)
514 - if (len > 3 && strcasecmp (word[2] + len - 3, ".sl") == 0)
515 + if (len > 3 && g_ascii_strcasecmp (word[2] + len - 3, ".sl") == 0)
517 - if (len > 3 && strcasecmp (word[2] + len - 3, ".so") == 0)
518 + if (len > 3 && g_ascii_strcasecmp (word[2] + len - 3, ".so") == 0)
522 @@ -3240,7 +3240,7 @@
526 - if (!strcasecmp (hostname, serv->hostname) && serv->connected)
527 + if (!g_ascii_strcasecmp (hostname, serv->hostname) && serv->connected)
531 @@ -3293,7 +3293,7 @@
532 /* maybe we're already connected to this net */
534 /* check for "FreeNode" */
535 - net = servlist_net_find (server_name, NULL, strcasecmp);
536 + net = servlist_net_find (server_name, NULL, g_ascii_strcasecmp);
537 /* check for "irc.eu.freenode.net" */
539 net = servlist_net_find_from_server (server_name);
540 @@ -3685,7 +3685,7 @@
542 command_compare (const void *a, const void *b)
544 - return strcasecmp (a, ((struct commands *)b)->name);
545 + return g_ascii_strcasecmp (a, ((struct commands *)b)->name);
548 static struct commands *
549 @@ -4257,7 +4257,7 @@
552 pop = (struct popup *) list->data;
553 - if (!strcasecmp (pop->name, word[1]))
554 + if (!g_ascii_strcasecmp (pop->name, word[1]))
556 user_command (sess, tbuf, pop->cmd, word, word_eol);
558 diff -Naur xchat-2.8.8-orig/src/common/plugin.c xchat-2.8.8/src/common/plugin.c
559 --- xchat-2.8.8-orig/src/common/plugin.c 2010-07-17 02:48:27.854723764 +0300
560 +++ xchat-2.8.8/src/common/plugin.c 2010-07-17 02:53:03.401351110 +0300
564 /* static-plugins (plugin-timer.c) have a NULL filename */
565 - if ((by_filename && pl->filename && strcasecmp (name, pl->filename) == 0) ||
566 - (by_filename && pl->filename && strcasecmp (name, file_part (pl->filename)) == 0) ||
567 - (!by_filename && strcasecmp (name, pl->name) == 0))
568 + if ((by_filename && pl->filename && g_ascii_strcasecmp (name, pl->filename) == 0) ||
569 + (by_filename && pl->filename && g_ascii_strcasecmp (name, file_part (pl->filename)) == 0) ||
570 + (!by_filename && g_ascii_strcasecmp (name, pl->name) == 0))
572 /* statically linked plugins have a NULL filename */
573 if (pl->filename != NULL && !pl->fake)
574 @@ -458,12 +458,12 @@
576 if (hook->type == type)
578 - if (strcasecmp (hook->name, name) == 0)
579 + if (g_ascii_strcasecmp (hook->name, name) == 0)
582 if (type == HOOK_SERVER)
584 - if (strcasecmp (hook->name, "RAW LINE") == 0)
585 + if (g_ascii_strcasecmp (hook->name, "RAW LINE") == 0)
591 if (servname == NULL ||
592 rfc_casecmp (servname, serv->servername) == 0 ||
593 - strcasecmp (servname, serv->hostname) == 0 ||
594 - strcasecmp (servname, netname) == 0)
595 + g_ascii_strcasecmp (servname, serv->hostname) == 0 ||
596 + g_ascii_strcasecmp (servname, netname) == 0)
599 return serv->front_session;
600 @@ -1097,7 +1097,7 @@
604 - if (!strcasecmp (name, vars[i].name))
605 + if (!g_ascii_strcasecmp (name, vars[i].name))
607 switch (vars[i].type)
609 diff -Naur xchat-2.8.8-orig/src/common/plugin-timer.c xchat-2.8.8/src/common/plugin-timer.c
610 --- xchat-2.8.8-orig/src/common/plugin-timer.c 2010-07-17 02:48:27.851390501 +0300
611 +++ xchat-2.8.8/src/common/plugin-timer.c 2010-07-17 02:53:03.404684862 +0300
613 #include "xchat-plugin.h"
616 -#define strcasecmp stricmp
617 +#define g_ascii_strcasecmp stricmp
620 static xchat_plugin *ph; /* plugin handle */
621 @@ -151,25 +151,25 @@
622 return XCHAT_EAT_XCHAT;
625 - if (strcasecmp (word[2], "-quiet") == 0)
626 + if (g_ascii_strcasecmp (word[2], "-quiet") == 0)
632 - if (strcasecmp (word[2 + offset], "-delete") == 0)
633 + if (g_ascii_strcasecmp (word[2 + offset], "-delete") == 0)
635 timer_del_ref (atoi (word[3 + offset]), quiet);
636 return XCHAT_EAT_XCHAT;
639 - if (strcasecmp (word[2 + offset], "-refnum") == 0)
640 + if (g_ascii_strcasecmp (word[2 + offset], "-refnum") == 0)
642 ref = atoi (word[3 + offset]);
646 - if (strcasecmp (word[2 + offset], "-repeat") == 0)
647 + if (g_ascii_strcasecmp (word[2 + offset], "-repeat") == 0)
649 repeat = atoi (word[3 + offset]);
651 diff -Naur xchat-2.8.8-orig/src/common/proto-irc.c xchat-2.8.8/src/common/proto-irc.c
652 --- xchat-2.8.8-orig/src/common/proto-irc.c 2010-07-17 02:48:27.854723764 +0300
653 +++ xchat-2.8.8/src/common/proto-irc.c 2010-07-17 02:53:03.408017845 +0300
654 @@ -472,12 +472,12 @@
658 - if (strcasecmp (word[7], "DALnet") == 0 ||
659 - strcasecmp (word[7], "BRASnet") == 0)
660 + if (g_ascii_strcasecmp (word[7], "DALnet") == 0 ||
661 + g_ascii_strcasecmp (word[7], "BRASnet") == 0)
662 serv->nickservtype = 1;
665 - else if (strcasecmp (word[7], "FreeNode") == 0)
666 + else if (g_ascii_strcasecmp (word[7], "FreeNode") == 0)
667 serv->nickservtype = 2;
670 @@ -1072,9 +1072,9 @@
674 - if (strncasecmp (text, "ACTION", 6) != 0)
675 + if (g_ascii_strncasecmp (text, "ACTION", 6) != 0)
676 flood_check (nick, ip, serv, sess, 0);
677 - if (strncasecmp (text, "DCC ", 4) == 0)
678 + if (g_ascii_strncasecmp (text, "DCC ", 4) == 0)
679 /* redo this with handle_quotes TRUE */
680 process_data_init (word[1], word_eol[1], word, word_eol, TRUE, FALSE);
681 ctcp_handle (sess, to, nick, ip, text, word, word_eol, id);
682 diff -Naur xchat-2.8.8-orig/src/common/server.c xchat-2.8.8/src/common/server.c
683 --- xchat-2.8.8-orig/src/common/server.c 2010-07-17 02:48:27.854723764 +0300
684 +++ xchat-2.8.8/src/common/server.c 2010-07-17 02:53:03.418017706 +0300
685 @@ -231,17 +231,17 @@
688 /* privmsg and notice get a lower priority */
689 - if (strncasecmp (dbuf + 1, "PRIVMSG", 7) == 0 ||
690 - strncasecmp (dbuf + 1, "NOTICE", 6) == 0)
691 + if (g_ascii_strncasecmp (dbuf + 1, "PRIVMSG", 7) == 0 ||
692 + g_ascii_strncasecmp (dbuf + 1, "NOTICE", 6) == 0)
698 /* WHO/MODE get the lowest priority */
699 - if (strncasecmp (dbuf + 1, "WHO ", 4) == 0 ||
700 + if (g_ascii_strncasecmp (dbuf + 1, "WHO ", 4) == 0 ||
701 /* but only MODE queries, not changes */
702 - (strncasecmp (dbuf + 1, "MODE", 4) == 0 &&
703 + (g_ascii_strncasecmp (dbuf + 1, "MODE", 4) == 0 &&
704 strchr (dbuf, '-') == NULL &&
705 strchr (dbuf, '+') == NULL))
708 if (serv->using_irc || /* 1. using CP1252/UTF-8 Hybrid */
709 (serv->encoding == NULL && prefs.utf8_locale) || /* OR 2. using system default->UTF-8 */
710 (serv->encoding != NULL && /* OR 3. explicitly set to UTF-8 */
711 - (strcasecmp (serv->encoding, "UTF8") == 0 ||
712 - strcasecmp (serv->encoding, "UTF-8") == 0)))
713 + (g_ascii_strcasecmp (serv->encoding, "UTF8") == 0 ||
714 + g_ascii_strcasecmp (serv->encoding, "UTF-8") == 0)))
716 /* The user has the UTF-8 charset set, either via /charset
717 command or from his UTF-8 locale. Thus, we first try the
718 @@ -1778,10 +1778,10 @@
721 /* server_inline() uses these flags */
722 - if (!strcasecmp (serv->encoding, "CP1255") ||
723 - !strcasecmp (serv->encoding, "WINDOWS-1255"))
724 + if (!g_ascii_strcasecmp (serv->encoding, "CP1255") ||
725 + !g_ascii_strcasecmp (serv->encoding, "WINDOWS-1255"))
726 serv->using_cp1255 = TRUE;
727 - else if (!strcasecmp (serv->encoding, "IRC"))
728 + else if (!g_ascii_strcasecmp (serv->encoding, "IRC"))
729 serv->using_irc = TRUE;
732 diff -Naur xchat-2.8.8-orig/src/common/servlist.c xchat-2.8.8/src/common/servlist.c
733 --- xchat-2.8.8-orig/src/common/servlist.c 2010-07-17 02:48:27.854723764 +0300
734 +++ xchat-2.8.8/src/common/servlist.c 2010-07-17 02:53:03.424684863 +0300
739 - if (strcasecmp (net->name, network) == 0)
740 + if (g_ascii_strcasecmp (net->name, network) == 0)
742 servlist_connect (sess, net, join);
748 - if (strcasecmp (serv->hostname, server_name) == 0)
749 + if (g_ascii_strcasecmp (serv->hostname, server_name) == 0)
753 @@ -1034,7 +1034,7 @@
757 - if (!strcasecmp (charset, "IRC")) /* special case */
758 + if (!g_ascii_strcasecmp (charset, "IRC")) /* special case */
762 @@ -1109,8 +1109,8 @@
763 fprintf (fp, "J=%s\n", net->autojoin);
765 fprintf (fp, "B=%s\n", net->nickserv);
766 - if (net->encoding && strcasecmp (net->encoding, "System") &&
767 - strcasecmp (net->encoding, "System default"))
768 + if (net->encoding && g_ascii_strcasecmp (net->encoding, "System") &&
769 + g_ascii_strcasecmp (net->encoding, "System default"))
771 fprintf (fp, "E=%s\n", net->encoding);
772 if (!servlist_check_encoding (net->encoding))
773 diff -Naur xchat-2.8.8-orig/src/common/url.c xchat-2.8.8/src/common/url.c
774 --- xchat-2.8.8-orig/src/common/url.c 2010-07-17 02:48:27.851390501 +0300
775 +++ xchat-2.8.8/src/common/url.c 2010-07-17 02:53:03.438018265 +0300
780 - if (tree_find (url_tree, urltext, (tree_cmp_func *)strcasecmp, NULL, &pos))
781 + if (tree_find (url_tree, urltext, (tree_cmp_func *)g_ascii_strcasecmp, NULL, &pos))
789 - url_tree = tree_new ((tree_cmp_func *)strcasecmp, NULL);
790 + url_tree = tree_new ((tree_cmp_func *)g_ascii_strcasecmp, NULL);
792 tree_insert (url_tree, data);
798 - /* This is pretty much strncasecmp(). */
799 + /* This is pretty much g_ascii_strncasecmp(). */
800 for (j = 0; j < l; j++)
802 unsigned char c = word[j];
804 const unsigned char *p = &word[len - l];
807 - /* This is pretty much strncasecmp(). */
808 + /* This is pretty much g_ascii_strncasecmp(). */
809 for (j = 0; j < l; j++)
811 if (tolower(p[j]) != suffix[i].s[j])
812 diff -Naur xchat-2.8.8-orig/src/common/util.c xchat-2.8.8/src/common/util.c
813 --- xchat-2.8.8-orig/src/common/util.c 2010-07-17 02:48:27.851390501 +0300
814 +++ xchat-2.8.8/src/common/util.c 2010-07-17 02:53:03.448017706 +0300
819 - while (rfc_tolower(*s) != rfc_tolower(*wanted) || strncasecmp (s, wanted, len))
820 + while (rfc_tolower(*s) != rfc_tolower(*wanted) || g_ascii_strncasecmp (s, wanted, len))
826 country_compare (const void *a, const void *b)
828 - return strcasecmp (a, ((domain_t *)b)->code);
829 + return g_ascii_strcasecmp (a, ((domain_t *)b)->code);
832 static const domain_t domain[] =
833 diff -Naur xchat-2.8.8-orig/src/common/xchat.h xchat-2.8.8/src/common/xchat.h
834 --- xchat-2.8.8-orig/src/common/xchat.h 2010-07-17 02:48:27.854723764 +0300
835 +++ xchat-2.8.8/src/common/xchat.h 2010-07-17 02:53:00.998018615 +0300
838 #ifdef __EMX__ /* for o/s 2 */
839 #define OFLAGS O_BINARY
840 -#define strcasecmp stricmp
841 -#define strncasecmp strnicmp
842 +#define g_ascii_strcasecmp stricmp
843 +#define g_ascii_strncasecmp strnicmp
844 #define PATH_MAX MAXPATHLEN
845 #define FILEPATH_LEN_MAX MAXPATHLEN
847 diff -Naur xchat-2.8.8-orig/src/fe-gtk/fkeys.c xchat-2.8.8/src/fe-gtk/fkeys.c
848 --- xchat-2.8.8-orig/src/fe-gtk/fkeys.c 2010-07-17 02:48:27.848312020 +0300
849 +++ xchat-2.8.8/src/fe-gtk/fkeys.c 2010-07-17 02:52:50.984685631 +0300
850 @@ -1257,11 +1257,11 @@
854 - if (!strcasecmp (d1, "up"))
855 + if (!g_ascii_strcasecmp (d1, "up"))
857 - else if (!strcasecmp (d1, "+1"))
858 + else if (!g_ascii_strcasecmp (d1, "+1"))
860 - else if (!strcasecmp (d1, "-1"))
861 + else if (!g_ascii_strcasecmp (d1, "-1"))
865 diff -Naur xchat-2.8.8-orig/src/fe-gtk/maingui.c xchat-2.8.8/src/fe-gtk/maingui.c
866 --- xchat-2.8.8-orig/src/fe-gtk/maingui.c 2010-07-17 02:48:27.698881088 +0300
867 +++ xchat-2.8.8/src/fe-gtk/maingui.c 2010-07-17 02:52:51.011355650 +0300
868 @@ -1712,7 +1712,7 @@
871 next = strchr (p, '\r');
872 - if (strncasecmp ("file:", p, 5) == 0)
873 + if (g_ascii_strncasecmp ("file:", p, 5) == 0)
877 @@ -2927,7 +2927,7 @@
878 if (a->type != SESS_CHANNEL && b->type == SESS_CHANNEL)
881 - return strcasecmp (a->channel, b->channel);
882 + return g_ascii_strcasecmp (a->channel, b->channel);
886 diff -Naur xchat-2.8.8-orig/src/fe-gtk/menu.c xchat-2.8.8/src/fe-gtk/menu.c
887 --- xchat-2.8.8-orig/src/fe-gtk/menu.c 2010-07-17 02:48:27.698881088 +0300
888 +++ xchat-2.8.8/src/fe-gtk/menu.c 2010-07-17 02:52:51.021353135 +0300
889 @@ -483,18 +483,18 @@
891 pop = (struct popup *) list->data;
893 - if (!strncasecmp (pop->name, "SUB", 3))
894 + if (!g_ascii_strncasecmp (pop->name, "SUB", 3))
897 tempmenu = menu_quick_sub (pop->cmd, tempmenu, &subitem, XCMENU_DOLIST|XCMENU_MNEMONIC, -1);
899 - } else if (!strncasecmp (pop->name, "TOGGLE", 6))
900 + } else if (!g_ascii_strncasecmp (pop->name, "TOGGLE", 6))
903 menu_toggle_item (pop->name + 7, tempmenu, toggle_cb, pop->cmd,
904 cfg_get_bool (pop->cmd));
906 - } else if (!strncasecmp (pop->name, "ENDSUB", 6))
907 + } else if (!g_ascii_strncasecmp (pop->name, "ENDSUB", 6))
909 /* empty sub menu due to no programs in PATH? */
910 if (check_path && childcount < 1)
912 tempmenu = menu_quick_endsub ();
913 /* If we get here and tempmenu equals menu that means we havent got any submenus to exit from */
915 - } else if (!strncasecmp (pop->name, "SEP", 3))
916 + } else if (!g_ascii_strncasecmp (pop->name, "SEP", 3))
918 menu_quick_item (0, 0, tempmenu, XCMENU_SHADED, 0, 0);
920 @@ -2120,7 +2120,7 @@
921 g_object_get (settings, "gtk-key-theme-name", &key_theme, NULL);
924 - if (!strcasecmp (key_theme, "Emacs"))
925 + if (!g_ascii_strcasecmp (key_theme, "Emacs"))
927 close_mask = GDK_SHIFT_MASK | GDK_CONTROL_MASK;
928 mymenu[SEARCH_OFFSET].key = 0;
929 diff -Naur xchat-2.8.8-orig/src/fe-gtk/notifygui.c xchat-2.8.8/src/fe-gtk/notifygui.c
930 --- xchat-2.8.8-orig/src/fe-gtk/notifygui.c 2010-07-17 02:48:27.698881088 +0300
931 +++ xchat-2.8.8/src/fe-gtk/notifygui.c 2010-07-17 02:52:51.024687655 +0300
933 if (text[0] && response == GTK_RESPONSE_ACCEPT)
935 networks = GTK_ENTRY (g_object_get_data (G_OBJECT (entry), "net"))->text;
936 - if (strcasecmp (networks, "ALL") == 0 || networks[0] == 0)
937 + if (g_ascii_strcasecmp (networks, "ALL") == 0 || networks[0] == 0)
938 notify_adduser (text, NULL);
940 notify_adduser (text, networks);
941 diff -Naur xchat-2.8.8-orig/src/fe-gtk/plugingui.c xchat-2.8.8/src/fe-gtk/plugingui.c
942 --- xchat-2.8.8-orig/src/fe-gtk/plugingui.c 2010-07-17 02:48:27.698881088 +0300
943 +++ xchat-2.8.8/src/fe-gtk/plugingui.c 2010-07-17 02:52:51.028019731 +0300
944 @@ -171,12 +171,12 @@
948 - if (len > 4 && strcasecmp (file + len - 4, ".dll") == 0)
949 + if (len > 4 && g_ascii_strcasecmp (file + len - 4, ".dll") == 0)
952 - if (len > 3 && strcasecmp (file + len - 3, ".sl") == 0)
953 + if (len > 3 && g_ascii_strcasecmp (file + len - 3, ".sl") == 0)
955 - if (len > 3 && strcasecmp (file + len - 3, ".so") == 0)
956 + if (len > 3 && g_ascii_strcasecmp (file + len - 3, ".so") == 0)
960 diff -Naur xchat-2.8.8-orig/src/fe-gtk/sexy-spell-entry.c xchat-2.8.8/src/fe-gtk/sexy-spell-entry.c
961 --- xchat-2.8.8-orig/src/fe-gtk/sexy-spell-entry.c 2010-07-17 02:48:27.702215748 +0300
962 +++ xchat-2.8.8/src/fe-gtk/sexy-spell-entry.c 2010-07-17 02:52:51.058019103 +0300
964 enchant_langs = sexy_spell_entry_get_languages(entry);
966 for (i = 0; langs[i]; i++) {
967 - if ((g_strncasecmp(langs[i], "C", 1) != 0) &&
968 + if ((g_ascii_strncasecmp(langs[i], "C", 1) != 0) &&
969 (strlen(langs[i]) >= 2) &&
970 enchant_has_lang(langs[i], enchant_langs)) {
971 if ((lastprefix == NULL) || (g_str_has_prefix(langs[i], lastprefix) == FALSE))
973 lang = (gchar *) g_getenv("LANG");
976 - if (g_strncasecmp(lang, "C", 1) == 0)
977 + if (g_ascii_strncasecmp(lang, "C", 1) == 0)
979 else if (lang[0] == '\0')
981 diff -Naur xchat-2.8.8-orig/src/fe-gtk/xtext.c xchat-2.8.8/src/fe-gtk/xtext.c
982 --- xchat-2.8.8-orig/src/fe-gtk/xtext.c 2010-07-17 02:48:27.702215748 +0300
983 +++ xchat-2.8.8/src/fe-gtk/xtext.c 2010-07-17 02:52:51.088018963 +0300
988 - while (toupper(*s) != toupper(*tofind) || strncasecmp (s, tofind, len))
989 + while (toupper(*s) != toupper(*tofind) || g_ascii_strncasecmp (s, tofind, len))
993 diff -Naur xchat-2.8.8-orig/src/fe-text/fe-text.c xchat-2.8.8/src/fe-text/fe-text.c
994 --- xchat-2.8.8-orig/src/fe-text/fe-text.c 2010-07-17 02:48:27.698881088 +0300
995 +++ xchat-2.8.8/src/fe-text/fe-text.c 2010-07-17 02:52:39.712189140 +0300
1000 - if (!strcasecmp (argv[1], "--version") || !strcasecmp (argv[1], "-v"))
1001 + if (!g_ascii_strcasecmp (argv[1], "--version") || !g_ascii_strcasecmp (argv[1], "-v"))
1003 puts (PACKAGE_VERSION);