[BACK]Return to diffreg.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / diff

Diff for /src/usr.bin/diff/diffreg.c between version 1.48 and 1.49

version 1.48, 2003/08/08 16:09:26 version 1.49, 2003/08/13 20:44:15
Line 634 
Line 634 
 {  {
         int i, k, y, j, l;          int i, k, y, j, l;
         int oldc, tc, oldl;          int oldc, tc, oldl;
         u_int loopcount;          u_int numtries;
   
         const u_int bound = dflag ? UINT_MAX : max(256, isqrt(n));          const u_int bound = dflag ? UINT_MAX : max(256, isqrt(n));
   
Line 647 
Line 647 
                 y = -b[j];                  y = -b[j];
                 oldl = 0;                  oldl = 0;
                 oldc = c[0];                  oldc = c[0];
                 loopcount = 0;                  numtries = 0;
                 do {                  do {
                         loopcount++;  
                         if (y <= clist[oldc].y)                          if (y <= clist[oldc].y)
                                 continue;                                  continue;
                         l = search(c, k, y);                          l = search(c, k, y);
Line 662 
Line 661 
                                 c[l] = newcand(i, y, oldc);                                  c[l] = newcand(i, y, oldc);
                                 oldc = tc;                                  oldc = tc;
                                 oldl = l;                                  oldl = l;
                                   numtries++;
                         } else {                          } else {
                                 c[l] = newcand(i, y, oldc);                                  c[l] = newcand(i, y, oldc);
                                 k++;                                  k++;
                                 break;                                  break;
                         }                          }
                 } while ((y = b[++j]) > 0 && loopcount < bound);                  } while ((y = b[++j]) > 0 && numtries < bound);
         }          }
         return (k);          return (k);
 }  }

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49