mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 15:12:11 +02:00
toupper(), tolower(), isspace(), is..etc..() aren't safe with chars in some
systems, use our own is_...() functions now instead. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2348 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
820c9d3d82
commit
f4897860b5
35 changed files with 112 additions and 95 deletions
|
|
@ -28,7 +28,7 @@
|
|||
#include "masks.h"
|
||||
|
||||
#define isalnumhigh(a) \
|
||||
(isalnum(a) || (unsigned char) (a) >= 128)
|
||||
(i_isalnum(a) || (unsigned char) (a) >= 128)
|
||||
|
||||
static void nick_hash_add(CHANNEL_REC *channel, NICK_REC *nick)
|
||||
{
|
||||
|
|
@ -532,10 +532,10 @@ int nick_match_msg(CHANNEL_REC *channel, const char *msg, const char *nick)
|
|||
|
||||
/* check if it matches for alphanumeric parts of nick */
|
||||
while (*nick != '\0' && *msg != '\0') {
|
||||
if (toupper(*nick) == toupper(*msg)) {
|
||||
if (i_toupper(*nick) == i_toupper(*msg)) {
|
||||
/* total match */
|
||||
msg++;
|
||||
} else if (isalnum(*msg) && !isalnum(*nick)) {
|
||||
} else if (i_isalnum(*msg) && !i_isalnum(*nick)) {
|
||||
/* some strange char in your nick, pass it */
|
||||
fullmatch = FALSE;
|
||||
} else
|
||||
|
|
@ -552,7 +552,7 @@ int nick_match_msg(CHANNEL_REC *channel, const char *msg, const char *nick)
|
|||
/* remove the rest of the non-alphanum chars
|
||||
from nick and check if it then matches. */
|
||||
fullmatch = FALSE;
|
||||
while (*nick != '\0' && !isalnum(*nick))
|
||||
while (*nick != '\0' && !i_isalnum(*nick))
|
||||
nick++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue