Compare strings A and B as file names containing version numbers,
and return an integer that is negative, zero, or positive depending
on whether A compares less than, equal to, or greater than B.
Return a version sort comparison value for Sโs byte at position POS. If POS
== LEN, sort before all non-โ~โ bytes.
Return the length of a prefix of S that corresponds to the suffix
defined by this extended regular expression in the C locale:
(.[A-Za-z~][A-Za-z0-9~])$
Use the longest suffix matching this regular expression,
except do not use all of S as a suffix if S is nonempty.
If *LEN is -1, S is a string; set *LEN to Sโs length.
Otherwise, *LEN should be nonnegative, S is a char array,
and *LEN does not change.
slightly modified verrevcmp function from dpkg
S1, S2 - compared char array