~ubuntu-branches/ubuntu/utopic/binkd/utopic-proposed

« back to all changes in this revision

Viewing changes to tools.c

  • Committer: Bazaar Package Importer
  • Author(s): Marco d'Itri
  • Date: 2002-03-24 22:52:25 UTC
  • Revision ID: james.westby@ubuntu.com-20020324225225-emwdv21tqzdb21le
Tags: 0.9.5a-4
Fixed ftrans (Closes: #139055).

Show diffs side-by-side

added added

removed removed

Lines of Context:
567
567
   else sz=*size;
568
568
   for(i=j=0;i<(int)strlen(r);i++)
569
569
   {
570
 
     if(tolower(r[i])!=tolower(a[j++]))
 
570
     if(r[i]!=a[j])
571
571
     {
 
572
       i-=j;
572
573
       j=0;
573
574
       continue;
574
575
     }
 
576
     j++;
575
577
     if(a[j]) continue;
576
 
     if(strlen(r)-len_a+len_b>sz)
 
578
     if(strlen(r)-len_a+len_b+1>sz)
577
579
     {
578
580
       if(len_b<64) sz+=64;
579
581
       else sz+=len_b;
583
585
     memmove(r+i+len_b, r+i+len_a, strlen(r+i+len_a)+1);
584
586
     if(len_b)
585
587
       memcpy(r+i, b, len_b);
 
588
     j=0;
 
589
     i+=len_b-1;
586
590
   }
587
591
   if(size) *size=sz;
588
592
   return r;