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

Diff for /src/usr.bin/rcs/rcsnum.c between version 1.10 and 1.11

version 1.10, 2008/01/31 16:36:11 version 1.11, 2008/05/22 07:03:02
Line 188 
Line 188 
  * 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(const RCSNUM *n1, const RCSNUM *n2, u_int depth)  rcsnum_cmp(const RCSNUM *n1, const RCSNUM *n2, u_int depth)
Line 210 
Line 211 
                         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.10  
changed lines
  Added in v.1.11