comparison main.c @ 459:75ed7be2cfe8

Rename compareUsername() to str_compare().
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 26 May 2012 05:45:11 +0300
parents 69ce77696c5d
children c956af023014
comparison
equal deleted inserted replaced
458:6eef0dc83f0a 459:75ed7be2cfe8
229 { 229 {
230 while (*buf != 0 && th_isspace(*buf)) buf++; 230 while (*buf != 0 && th_isspace(*buf)) buf++;
231 return buf; 231 return buf;
232 } 232 }
233 233
234 int compareUsername(const void *s1, const void *s2) 234 int str_compare(const void *s1, const void *s2)
235 { 235 {
236 return th_strcasecmp((char *) s1, (char *) s2); 236 return th_strcasecmp((const char *) s1, (const char *) s2);
237 } 237 }
238 238
239 nn_window_t *nnwin_find(const char *id) 239 nn_window_t *nnwin_find(const char *id)
240 { 240 {
241 int i; 241 int i;
948 (void) conn; 948 (void) conn;
949 949
950 if (name[0]) 950 if (name[0])
951 { 951 {
952 // Add or remove someone to/from ignore 952 // Add or remove someone to/from ignore
953 qlist_t *user = th_llist_find_func(setIgnoreList, name, compareUsername); 953 qlist_t *user = th_llist_find_func(setIgnoreList, name, str_compare);
954 if (user != NULL) 954 if (user != NULL)
955 { 955 {
956 printMsgQ(currWin, "Removed user '%s' from ignore.\n", name); 956 printMsgQ(currWin, "Removed user '%s' from ignore.\n", name);
957 th_llist_delete_node(&setIgnoreList, user); 957 th_llist_delete_node(&setIgnoreList, user);
958 } 958 }