Displaying 1 result from an estimated 1 matches for "shift10".
Did you mean:
shift1b
2006 Oct 03
2
strverscmp, scandir, alphasort and versionsort
...if they have a decimal point in front (so that in par-
ticular digit strings with more leading zeroes come before digit
strings with fewer leading zeroes). Thus, the ordering is 000, 00, 01,
010, 09, 0, 1, 9, 10.
*/
/* shift by ten, to the left */
static unsigned long shift10(unsigned long v, int n)
{
while (n--)
v *= 10;
return v;
}
/* strverscmp */
int strverscmp(const char *s1, const char *s2)
{
int i;
unsigned long v1, v2; /* numerical value */
int l1, l2, /* length of digit strings */
z1, z2, /* length of leading zeroes string */
j1, j2, /* point...