=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/rcsnum.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/rcs/rcsnum.c 2008/01/31 16:36:11 1.10 --- src/usr.bin/rcs/rcsnum.c 2008/05/22 07:03:02 1.11 *************** *** 1,4 **** ! /* $OpenBSD: rcsnum.c,v 1.10 2008/01/31 16:36:11 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: rcsnum.c,v 1.11 2008/05/22 07:03:02 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 188,195 **** * Compare the two numbers and . Returns -1 if is larger than * , 0 if they are both the same, and 1 if is larger than . * The 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 ! * two numbers. */ int rcsnum_cmp(const RCSNUM *n1, const RCSNUM *n2, u_int depth) --- 188,196 ---- * Compare the two numbers and . Returns -1 if is larger than * , 0 if they are both the same, and 1 if is larger than . * The argument specifies how many numbers deep should be checked for ! * the result. A value of 0 means that the depth will be the maximum of the ! * two numbers, so that a longer number is considered greater than a shorter ! * number if they are equal up to the minimum length. */ int rcsnum_cmp(const RCSNUM *n1, const RCSNUM *n2, u_int depth) *************** *** 210,216 **** return (-1); } ! if (n1->rn_len > n2->rn_len) return (-1); else if (n2->rn_len > n1->rn_len) return (1); --- 211,222 ---- return (-1); } ! /* 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); else if (n2->rn_len > n1->rn_len) return (1);