Mercurial > hg > nnchat
diff libnnchat.c @ 372:b9f0bdad6285
Use th_strcasecmp() and th_strncasecmp().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 23 Jun 2011 14:43:10 +0300 |
parents | 88ac689d11bc |
children | 812af6823eb7 |
line wrap: on
line diff
--- a/libnnchat.c Thu Jun 23 12:54:18 2011 +0300 +++ b/libnnchat.c Thu Jun 23 14:43:10 2011 +0300 @@ -870,7 +870,7 @@ if (list->buckets[hash] != NULL) { nn_user_t *curr = list->buckets[hash]; while (curr != NULL) { - if (strcasecmp(curr->name, name) == 0) + if (th_strcasecmp(curr->name, name) == 0) return curr; curr = curr->next; } @@ -884,7 +884,7 @@ { nn_user_t *curr = list; while (curr != NULL) { - if (len <= strlen(curr->name) && strncasecmp(curr->name, pattern, len) == 0) + if (len <= strlen(curr->name) && th_strncasecmp(curr->name, pattern, len) == 0) return curr; curr = curr->next; } @@ -906,7 +906,7 @@ if (current != NULL) { nn_user_t *found = NULL; while (curr != NULL) { - if (strcasecmp(curr->name, current) == 0) { + if (th_strcasecmp(curr->name, current) == 0) { if (again) return curr; found = curr->next; @@ -976,7 +976,7 @@ curr = list->buckets[hash]; prev = NULL; while (curr != NULL) { - if (strcasecmp(curr->name, name) == 0) { + if (th_strcasecmp(curr->name, name) == 0) { if (prev) prev->next = curr->next; else