Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/compl.c @ 104:fe7257d251ac
[/trunk] Changeset 118 by mikael
* Commands are ready. Callback system in place.
* Implement /roster callback :)
* Completion is case-insensitive (good idea??)
author | mikael |
---|---|
date | Thu, 21 Apr 2005 20:22:35 +0000 |
parents | 93dcc4e15d4a |
children | 94b251102069 |
comparison
equal
deleted
inserted
replaced
103:93dcc4e15d4a | 104:fe7257d251ac |
---|---|
76 | 76 |
77 c = g_new0(compl, 1); | 77 c = g_new0(compl, 1); |
78 // Build the list of matches | 78 // Build the list of matches |
79 for (sl_cat=compl_cat; sl_cat; sl_cat = g_slist_next(sl_cat)) { | 79 for (sl_cat=compl_cat; sl_cat; sl_cat = g_slist_next(sl_cat)) { |
80 char *word = sl_cat->data; | 80 char *word = sl_cat->data; |
81 if (!strncmp(prefix, word, len)) { | 81 if (!strncasecmp(prefix, word, len)) { |
82 if (strlen(word) != len) | 82 if (strlen(word) != len) |
83 c->list = g_slist_append(c->list, g_strdup(word+len)); // TODO sort | 83 c->list = g_slist_append(c->list, g_strdup(word+len)); // TODO sort |
84 } | 84 } |
85 } | 85 } |
86 c->next = c->list; | 86 c->next = c->list; |