View | Details | Raw Unified | Return to bug 176767
Collapse All | Expand All

(-)/home/hirenp/libyahoo.c 2013-03-08 12:07:09.562185831 -0800 (-20 / +22 lines)
Lines 3336-3341 Link Here
3336
       return 0;
3336
       return 0;
3337
}
3337
}
3338
3338
3339
char *maxstrtok(char *str, char *delim)
3340
{
3341
       static char *strtokpos=NULL;
3342
        char *delimpos, *delimptr=NULL, *delimtmp;
3343
        if (str) strtokpos=str;
3344
        delimpos=delim;
3345
        while (*delimpos)
3346
        {
3347
            if ((delimtmp=strchr(strtokpos,*delimpos)))
3348
             {
3349
               if (delimtmp>delimptr) delimptr=delimtmp;
3350
             }
3351
            delimpos++;
3352
        }
3353
        if (!delimptr) return NULL;
3354
        delimtmp=strtokpos;
3355
        *delimptr=0;
3356
        strtokpos=delimptr+1;
3357
        return delimtmp;
3358
}
3359
3360
       /* Make working copy of content */
3339
int yahoo_parsepacket_status(struct yahoo_context *ctx,
3361
int yahoo_parsepacket_status(struct yahoo_context *ctx,
3340
       struct yahoo_packet *pkt, struct yahoo_rawpacket *inpkt)
3362
       struct yahoo_packet *pkt, struct yahoo_rawpacket *inpkt)
3341
{
3363
{
Lines 3347-3372 Link Here
3347
       int index;
3369
       int index;
3348
       int realcount;
3370
       int realcount;
3349
3371
3350
        char *maxstrtok(char *str, char *delim)
3351
         {
3352
          static char *strtokpos=NULL;
3353
          char *delimpos, *delimptr=NULL, *delimtmp;
3354
          if (str) strtokpos=str;
3355
          delimpos=delim;
3356
          while (*delimpos)
3357
           {
3358
            if ((delimtmp=strchr(strtokpos,*delimpos)))
3359
             {
3360
              if (delimtmp>delimptr) delimptr=delimtmp;
3361
             }
3362
            delimpos++;
3363
           }
3364
          if (!delimptr) return NULL;
3365
          delimtmp=strtokpos;
3366
          *delimptr=0;
3367
          strtokpos=delimptr+1;
3368
          return delimtmp;
3369
         }
3370
       /* Make working copy of content */
3372
       /* Make working copy of content */
3371
       content = strdup(inpkt->content);
3373
       content = strdup(inpkt->content);
3372
       len = strlen(content);
3374
       len = strlen(content);

Return to bug 176767