--- work/ari-yahoo-1.10/libyahoo/libyahoo.c 2001-12-03 17:35:26.000000000 -0800 +++ /home/hirenp/libyahoo.c 2013-03-08 12:07:09.562185831 -0800 @@ -3336,6 +3336,28 @@ return 0; } +char *maxstrtok(char *str, char *delim) +{ + static char *strtokpos=NULL; + char *delimpos, *delimptr=NULL, *delimtmp; + if (str) strtokpos=str; + delimpos=delim; + while (*delimpos) + { + if ((delimtmp=strchr(strtokpos,*delimpos))) + { + if (delimtmp>delimptr) delimptr=delimtmp; + } + delimpos++; + } + if (!delimptr) return NULL; + delimtmp=strtokpos; + *delimptr=0; + strtokpos=delimptr+1; + return delimtmp; +} + + /* Make working copy of content */ int yahoo_parsepacket_status(struct yahoo_context *ctx, struct yahoo_packet *pkt, struct yahoo_rawpacket *inpkt) { @@ -3347,26 +3369,6 @@ int index; int realcount; - char *maxstrtok(char *str, char *delim) - { - static char *strtokpos=NULL; - char *delimpos, *delimptr=NULL, *delimtmp; - if (str) strtokpos=str; - delimpos=delim; - while (*delimpos) - { - if ((delimtmp=strchr(strtokpos,*delimpos))) - { - if (delimtmp>delimptr) delimptr=delimtmp; - } - delimpos++; - } - if (!delimptr) return NULL; - delimtmp=strtokpos; - *delimptr=0; - strtokpos=delimptr+1; - return delimtmp; - } /* Make working copy of content */ content = strdup(inpkt->content); len = strlen(content);