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

Diff for /src/usr.bin/cvs/rcsnum.c between version 1.52 and 1.53

version 1.52, 2008/03/01 20:03:56 version 1.53, 2008/05/22 07:03:02
Line 180 
Line 180 
  * Compare the two numbers <n1> and <n2>. Returns -1 if <n1> is larger than   * Compare the two numbers <n1> and <n2>. Returns -1 if <n1> is larger than
  * <n2>, 0 if they are both the same, and 1 if <n2> is larger than <n1>.   * <n2>, 0 if they are both the same, and 1 if <n2> is larger than <n1>.
  * The <depth> argument specifies how many numbers deep should be checked for   * The <depth> argument specifies how many numbers deep should be checked for
  * the result.  A value of 0 means that the depth will be the minimum of the   * the result.  A value of 0 means that the depth will be the maximum of the
  * two numbers.   * two numbers, so that a longer number is considered greater than a shorter
    * number if they are equal up to the minimum length.
  */   */
 int  int
 rcsnum_cmp(RCSNUM *n1, RCSNUM *n2, u_int depth)  rcsnum_cmp(RCSNUM *n1, RCSNUM *n2, u_int depth)
Line 205 
Line 206 
                         return (-1);                          return (-1);
         }          }
   
         if (n1->rn_len > n2->rn_len)          /* If an explicit depth was specified, and we've
            * already checked up to depth, consider the
            * revision numbers equal. */
           if (depth != 0 && slen == depth)
                   return (0);
           else if (n1->rn_len > n2->rn_len)
                 return (-1);                  return (-1);
         else if (n2->rn_len > n1->rn_len)          else if (n2->rn_len > n1->rn_len)
                 return (1);                  return (1);

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53