Mercurial > pidgin.yaz
diff libpurple/protocols/oscar/util.c @ 30821:88689cda97d8
Turns out that ncc doesn't catch everything, so continue killing things mercilessly.
Removed AIM_CHATROOM_FLAG_* defines
and everything that wasn't used in purple_conv_chat_info_update()
(pretty much all contents of a packet). Also, removed unused
aim_util_*() and aim_chat_getconn() functions.
author | ivan.komarov@soc.pidgin.im |
---|---|
date | Wed, 28 Jul 2010 18:59:39 +0000 |
parents | 2d4dd38c5db5 |
children | 8e9b04071e79 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/util.c Wed Jul 28 17:43:58 2010 +0000 +++ b/libpurple/protocols/oscar/util.c Wed Jul 28 18:59:39 2010 +0000 @@ -107,91 +107,6 @@ return g_strdup_printf("%s/%s", name, version);; } -/* - * Tokenizing functions. Used to portably replace strtok/sep. - * -- DMP. - * - */ -/* TODO: Get rid of this and use glib functions */ -int -aimutil_tokslen(char *toSearch, int theindex, char dl) -{ - int curCount = 1; - char *next; - char *last; - int toReturn; - - last = toSearch; - next = strchr(toSearch, dl); - - while(curCount < theindex && next != NULL) { - curCount++; - last = next + 1; - next = strchr(last, dl); - } - - if ((curCount < theindex) || (next == NULL)) - toReturn = strlen(toSearch) - (curCount - 1); - else - toReturn = next - toSearch - (curCount - 1); - - return toReturn; -} - -int -aimutil_itemcnt(char *toSearch, char dl) -{ - int curCount; - char *next; - - curCount = 1; - - next = strchr(toSearch, dl); - - while(next != NULL) { - curCount++; - next = strchr(next + 1, dl); - } - - return curCount; -} - -char * -aimutil_itemindex(char *toSearch, int theindex, char dl) -{ - int curCount; - char *next; - char *last; - char *toReturn; - - curCount = 0; - - last = toSearch; - next = strchr(toSearch, dl); - - while (curCount < theindex && next != NULL) { - curCount++; - last = next + 1; - next = strchr(last, dl); - } - next = strchr(last, dl); - - if (curCount < theindex) { - toReturn = g_malloc(sizeof(char)); - *toReturn = '\0'; - } else { - if (next == NULL) { - toReturn = g_malloc((strlen(last) + 1) * sizeof(char)); - strcpy(toReturn, last); - } else { - toReturn = g_malloc((next - last + 1) * sizeof(char)); - memcpy(toReturn, last, (next - last)); - toReturn[next - last] = '\0'; - } - } - return toReturn; -} - /** * Calculate the checksum of a given icon. */