updated on Fri Jan 13 20:02:10 UTC 2012
[aur-mirror.git] / xchat-turkishfix / ascii_str.patch
blobbd15e8ee91b4f2e3e57d7d9dd2ac706aa022977a
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
4 @@ -82,11 +82,11 @@
6 if (*buf != '#')
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));
17 if (*name)
18 @@ -152,7 +152,7 @@
19 while (alist)
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);
26 free (pop);
27 @@ -168,7 +168,7 @@
29 while (1)
31 - if (!strncasecmp (var, cfg, strlen (var)))
32 + if (!g_ascii_strncasecmp (var, cfg, strlen (var)))
34 char *value, t;
35 cfg += strlen (var);
36 @@ -940,7 +940,7 @@
40 - if (!strcasecmp (var, vars[i].name))
41 + if (!g_ascii_strcasecmp (var, vars[i].name))
43 return *((int *) &prefs + vars[i].offset);
45 @@ -963,27 +963,27 @@
46 int idx = 2;
47 char *var, *val;
49 - if (strcasecmp (word[2], "-e") == 0)
50 + if (g_ascii_strcasecmp (word[2], "-e") == 0)
52 idx++;
53 erase = TRUE;
56 /* turn a bit OFF */
57 - if (strcasecmp (word[idx], "-off") == 0)
58 + if (g_ascii_strcasecmp (word[idx], "-off") == 0)
60 idx++;
61 off = TRUE;
64 /* turn a bit ON */
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)
68 idx++;
69 or = TRUE;
72 - if (strcasecmp (word[idx], "-quiet") == 0)
73 + if (g_ascii_strcasecmp (word[idx], "-quiet") == 0)
75 idx++;
76 quiet = TRUE;
77 @@ -1009,7 +1009,7 @@
78 if (wild)
79 found = !match (var, vars[i].name);
80 else
81 - found = strcasecmp (var, vars[i].name);
82 + found = g_ascii_strcasecmp (var, vars[i].name);
84 if (found == 0)
86 @@ -1038,9 +1038,9 @@
87 *((int *) &prefs + vars[i].offset) = 1;
88 else
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;
96 } else
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
101 @@ -81,9 +81,9 @@
103 if (word[offset][0])
105 - if (!strcasecmp (word[offset], "ON"))
106 + if (!g_ascii_strcasecmp (word[offset], "ON"))
107 newval = 1;
108 - else if (!strcasecmp (word[offset], "OFF"))
109 + else if (!g_ascii_strcasecmp (word[offset], "OFF"))
110 newval = 0;
111 else if (word[offset][0] == 'u')
112 newval = SET_DEFAULT;
113 @@ -183,8 +183,8 @@
114 for (list = chanopt_list; list; list = list->next)
116 co = list->data;
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))
121 return co;
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
127 @@ -70,7 +70,7 @@
128 while (list)
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);
135 ret = 1;
136 @@ -94,7 +94,7 @@
137 ctcp_offset = 3;
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))
145 @@ -107,7 +107,7 @@
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))
154 @@ -132,7 +132,7 @@
155 if (ignore_check (word[1], IG_CTCP))
156 return;
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",
162 get_cpu_str ());
163 @@ -141,7 +141,7 @@
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');
171 if (po)
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
175 @@ -568,7 +568,7 @@
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');
183 if (po)
184 @@ -1936,9 +1936,9 @@
186 if (!file[0])
187 return dcc;
188 - if (!strcasecmp (file, file_part (dcc->file)))
189 + if (!g_ascii_strcasecmp (file, file_part (dcc->file)))
190 return dcc;
191 - if (!strcasecmp (file, dcc->file))
192 + if (!g_ascii_strcasecmp (file, dcc->file))
193 return dcc;
196 @@ -2402,7 +2402,7 @@
197 DCC_SIZE size;
198 int psend = 0;
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 @@
206 return;
209 - if (!strcasecmp (type, "Resume"))
210 + if (!g_ascii_strcasecmp (type, "Resume"))
212 port = atoi (word[7]);
214 @@ -2493,7 +2493,7 @@
216 return;
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 @@
225 return;
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
235 @@ -881,7 +881,7 @@
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 @@
250 /* use /NICKSERV */
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);
284 return TRUE;
287 - if (strncasecmp (reason, "all", 3) == 0)
288 + if (g_ascii_strncasecmp (reason, "all", 3) == 0)
290 while (list)
292 @@ -750,26 +750,26 @@
293 char *type = word[2];
294 if (*type)
296 - if (!strcasecmp (type, "HELP"))
297 + if (!g_ascii_strcasecmp (type, "HELP"))
298 return FALSE;
299 - if (!strcasecmp (type, "CLOSE"))
300 + if (!g_ascii_strcasecmp (type, "CLOSE"))
302 if (*word[3] && *word[4])
304 goodtype = 0;
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);
310 goodtype = TRUE;
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);
317 goodtype = TRUE;
319 - if (!strcasecmp (word[3], "CHAT"))
320 + if (!g_ascii_strcasecmp (word[3], "CHAT"))
322 dcc = find_dcc (word[4], "", TYPE_CHATRECV);
323 if (!dcc)
324 @@ -789,20 +789,20 @@
326 return FALSE;
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;
334 if (*nick)
335 dcc_chat (sess, nick, passive);
336 return TRUE;
338 - if (!strcasecmp (type, "LIST"))
339 + if (!g_ascii_strcasecmp (type, "LIST"))
341 dcc_show_list (sess);
342 return TRUE;
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 @@
351 return TRUE;
353 - if ((!strcasecmp (type, "SEND")) || (!strcasecmp (type, "PSEND")))
354 + if ((!g_ascii_strcasecmp (type, "SEND")) || (!g_ascii_strcasecmp (type, "PSEND")))
356 int i = 3, maxcps;
357 char *nick, *file;
358 - int passive = (!strcasecmp(type, "PSEND")) ? 1 : 0;
359 + int passive = (!g_ascii_strcasecmp(type, "PSEND")) ? 1 : 0;
361 nick = word[i];
362 if (!*nick)
363 return FALSE;
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);
370 i++;
371 @@ -1312,7 +1312,7 @@
372 *p = '/';
375 - if (!strcasecmp (word[idx], "ADD"))
376 + if (!g_ascii_strcasecmp (word[idx], "ADD"))
378 if (toggle)
380 @@ -1327,7 +1327,7 @@
381 return TRUE;
384 - if (!strcasecmp (word[idx], "DEL"))
385 + if (!g_ascii_strcasecmp (word[idx], "DEL"))
387 menu_del (tbuf, label);
388 return TRUE;
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);
396 else
397 return FALSE;
398 @@ -2247,25 +2247,25 @@
400 return TRUE;
402 - if (!strcasecmp (word[i], "UNIGNORE"))
403 + if (!g_ascii_strcasecmp (word[i], "UNIGNORE"))
404 type |= IG_UNIG;
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"))
410 type |= IG_PRIV;
411 - else if (!strcasecmp (word[i], "NOTI"))
412 + else if (!g_ascii_strcasecmp (word[i], "NOTI"))
413 type |= IG_NOTI;
414 - else if (!strcasecmp (word[i], "CHAN"))
415 + else if (!g_ascii_strcasecmp (word[i], "CHAN"))
416 type |= IG_CHAN;
417 - else if (!strcasecmp (word[i], "CTCP"))
418 + else if (!g_ascii_strcasecmp (word[i], "CTCP"))
419 type |= IG_CTCP;
420 - else if (!strcasecmp (word[i], "INVI"))
421 + else if (!g_ascii_strcasecmp (word[i], "INVI"))
422 type |= IG_INVI;
423 - else if (!strcasecmp (word[i], "QUIET"))
424 + else if (!g_ascii_strcasecmp (word[i], "QUIET"))
425 quiet = 1;
426 - else if (!strcasecmp (word[i], "NOSAVE"))
427 + else if (!g_ascii_strcasecmp (word[i], "NOSAVE"))
428 type |= IG_NOSAVE;
429 - else if (!strcasecmp (word[i], "DCC"))
430 + else if (!g_ascii_strcasecmp (word[i], "DCC"))
431 type |= IG_DCC;
432 else
434 @@ -2456,12 +2456,12 @@
435 #ifdef USE_PLUGIN
436 len = strlen (word[2]);
437 #ifdef WIN32
438 - if (len > 4 && strcasecmp (".dll", word[2] + len - 4) == 0)
439 + if (len > 4 && g_ascii_strcasecmp (".dll", word[2] + len - 4) == 0)
440 #else
441 #if defined(__hpux)
442 - if (len > 3 && strcasecmp (".sl", word[2] + len - 3) == 0)
443 + if (len > 3 && g_ascii_strcasecmp (".sl", word[2] + len - 3) == 0)
444 #else
445 - if (len > 3 && strcasecmp (".so", word[2] + len - 3) == 0)
446 + if (len > 3 && g_ascii_strcasecmp (".so", word[2] + len - 3) == 0)
447 #endif
448 #endif
450 @@ -2613,8 +2613,8 @@
451 else
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"))
468 list = serv_list;
469 while (list)
470 @@ -2980,7 +2980,7 @@
472 char *co;
473 #ifdef USE_OPENSSL
474 - if (strncasecmp ("ircs://", url, 7) == 0)
475 + if (g_ascii_strncasecmp ("ircs://", url, 7) == 0)
477 *use_ssl = TRUE;
478 *server_name = url + 7;
479 @@ -2988,7 +2988,7 @@
481 #endif
483 - if (strncasecmp ("irc://", url, 6) == 0)
484 + if (g_ascii_strncasecmp ("irc://", url, 6) == 0)
486 *server_name = url + 6;
487 #ifdef USE_OPENSSL
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;
496 if (channel)
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);
505 return TRUE;
506 @@ -3205,12 +3205,12 @@
508 len = strlen (word[2]);
509 #ifdef WIN32
510 - if (len > 4 && strcasecmp (word[2] + len - 4, ".dll") == 0)
511 + if (len > 4 && g_ascii_strcasecmp (word[2] + len - 4, ".dll") == 0)
512 #else
513 #if defined(__hpux)
514 - if (len > 3 && strcasecmp (word[2] + len - 3, ".sl") == 0)
515 + if (len > 3 && g_ascii_strcasecmp (word[2] + len - 3, ".sl") == 0)
516 #else
517 - if (len > 3 && strcasecmp (word[2] + len - 3, ".so") == 0)
518 + if (len > 3 && g_ascii_strcasecmp (word[2] + len - 3, ".so") == 0)
519 #endif
520 #endif
521 by_file = TRUE;
522 @@ -3240,7 +3240,7 @@
523 while (list)
525 serv = list->data;
526 - if (!strcasecmp (hostname, serv->hostname) && serv->connected)
527 + if (!g_ascii_strcasecmp (hostname, serv->hostname) && serv->connected)
528 return serv;
529 list = list->next;
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" */
538 if (!net)
539 net = servlist_net_find_from_server (server_name);
540 @@ -3685,7 +3685,7 @@
541 static int
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 @@
550 while (list)
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);
557 user_cmd = TRUE;
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
561 @@ -295,9 +295,9 @@
563 pl = list->data;
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 @@
575 hook = list->data;
576 if (hook->type == type)
578 - if (strcasecmp (hook->name, name) == 0)
579 + if (g_ascii_strcasecmp (hook->name, name) == 0)
580 return list;
582 if (type == HOOK_SERVER)
584 - if (strcasecmp (hook->name, "RAW LINE") == 0)
585 + if (g_ascii_strcasecmp (hook->name, "RAW LINE") == 0)
586 return list;
589 @@ -933,8 +933,8 @@
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)
598 if (channel == NULL)
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
612 @@ -4,7 +4,7 @@
613 #include "xchat-plugin.h"
615 #ifdef WIN32
616 -#define strcasecmp stricmp
617 +#define g_ascii_strcasecmp stricmp
618 #endif
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)
628 quiet = TRUE;
629 offset++;
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]);
643 offset += 2;
646 - if (strcasecmp (word[2 + offset], "-repeat") == 0)
647 + if (g_ascii_strcasecmp (word[2 + offset], "-repeat") == 0)
649 repeat = atoi (word[3 + offset]);
650 offset += 2;
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 @@
657 /* use /NICKSERV */
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;
664 /* use /NS */
665 - else if (strcasecmp (word[7], "FreeNode") == 0)
666 + else if (g_ascii_strcasecmp (word[7], "FreeNode") == 0)
667 serv->nickservtype = 2;
669 goto def;
670 @@ -1072,9 +1072,9 @@
672 text[len - 1] = 0;
673 text++;
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 @@
686 dbuf[len + 1] = 0;
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)
694 dbuf[0] = 1;
696 else
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))
706 dbuf[0] = 0;
707 @@ -307,8 +307,8 @@
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 @@
719 space[0] = 0;
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
735 @@ -604,7 +604,7 @@
737 net = list->data;
739 - if (strcasecmp (net->name, network) == 0)
740 + if (g_ascii_strcasecmp (net->name, network) == 0)
742 servlist_connect (sess, net, join);
743 return 1;
744 @@ -749,7 +749,7 @@
745 while (slist)
747 serv = slist->data;
748 - if (strcasecmp (serv->hostname, server_name) == 0)
749 + if (g_ascii_strcasecmp (serv->hostname, server_name) == 0)
750 return net;
751 slist = slist->next;
753 @@ -1034,7 +1034,7 @@
754 if (c)
755 c[0] = 0;
757 - if (!strcasecmp (charset, "IRC")) /* special case */
758 + if (!g_ascii_strcasecmp (charset, "IRC")) /* special case */
760 if (c)
761 c[0] = ' ';
762 @@ -1109,8 +1109,8 @@
763 fprintf (fp, "J=%s\n", net->autojoin);
764 if (net->nickserv)
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
776 @@ -81,7 +81,7 @@
778 int pos;
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))
782 return 1;
783 return 0;
785 @@ -110,7 +110,7 @@
788 if (!url_tree)
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);
793 fe_url_add (data);
794 @@ -168,7 +168,7 @@
796 int j;
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];
803 @@ -220,7 +220,7 @@
804 const unsigned char *p = &word[len - l];
805 int j;
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
815 @@ -280,7 +280,7 @@
817 if (len == 0)
818 return (char *)s;
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))
821 if (*s++ == '\0')
822 return (char *)NULL;
823 return (char *)s;
824 @@ -840,7 +840,7 @@
825 static int
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
836 @@ -45,8 +45,8 @@
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
846 #endif
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 @@
852 if (d1)
854 - if (!strcasecmp (d1, "up"))
855 + if (!g_ascii_strcasecmp (d1, "up"))
856 type = PAGE_UP;
857 - else if (!strcasecmp (d1, "+1"))
858 + else if (!g_ascii_strcasecmp (d1, "+1"))
859 type = LINE_DOWN;
860 - else if (!strcasecmp (d1, "-1"))
861 + else if (!g_ascii_strcasecmp (d1, "-1"))
862 type = LINE_UP;
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 @@
869 while (*p)
871 next = strchr (p, '\r');
872 - if (strncasecmp ("file:", p, 5) == 0)
873 + if (g_ascii_strncasecmp ("file:", p, 5) == 0)
875 if (next)
876 *next = 0;
877 @@ -2927,7 +2927,7 @@
878 if (a->type != SESS_CHANNEL && b->type == SESS_CHANNEL)
879 return 1;
881 - return strcasecmp (a->channel, b->channel);
882 + return g_ascii_strcasecmp (a->channel, b->channel);
885 static void
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))
896 childcount = 0;
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))
902 childcount++;
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)
911 @@ -505,7 +505,7 @@
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);
922 if (key_theme)
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
932 @@ -321,7 +321,7 @@
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);
939 else
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 @@
946 len = strlen (file);
947 #ifdef WIN32
948 - if (len > 4 && strcasecmp (file + len - 4, ".dll") == 0)
949 + if (len > 4 && g_ascii_strcasecmp (file + len - 4, ".dll") == 0)
950 #else
951 #if defined(__hpux)
952 - if (len > 3 && strcasecmp (file + len - 3, ".sl") == 0)
953 + if (len > 3 && g_ascii_strcasecmp (file + len - 3, ".sl") == 0)
954 #else
955 - if (len > 3 && strcasecmp (file + len - 3, ".so") == 0)
956 + if (len > 3 && g_ascii_strcasecmp (file + len - 3, ".so") == 0)
957 #endif
958 #endif
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
963 @@ -941,7 +941,7 @@
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))
972 @@ -969,7 +969,7 @@
973 lang = (gchar *) g_getenv("LANG");
975 if (lang != NULL) {
976 - if (g_strncasecmp(lang, "C", 1) == 0)
977 + if (g_ascii_strncasecmp(lang, "C", 1) == 0)
978 lang = NULL;
979 else if (lang[0] == '\0')
980 lang = NULL;
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
984 @@ -161,7 +161,7 @@
986 if (len == 0)
987 return (char *)s;
988 - while (toupper(*s) != toupper(*tofind) || strncasecmp (s, tofind, len))
989 + while (toupper(*s) != toupper(*tofind) || g_ascii_strncasecmp (s, tofind, len))
990 if (*s++ == '\0')
991 return (char *)NULL;
992 return (char *)s;
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
996 @@ -391,7 +391,7 @@
998 if (argc > 1)
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);
1004 return 0;