X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/8f45ff6cb9a269fc6f8f631908f93b4c8123419c..4aee39a18184ae8595936a03ad254c27d149a0eb:/man/versioncmp.3 diff --git a/man/versioncmp.3 b/man/versioncmp.3 deleted file mode 100644 index f3afc18..0000000 --- a/man/versioncmp.3 +++ /dev/null @@ -1,56 +0,0 @@ -.\" -*-nroff-*- -.TH versioncmp 3 "6 January 2007" "Straylight/Edgeware" "mLib utilities library" -.SH NAME -versioncmp \- compare Debian-format version numbers -.\" @versioncmp -.SH SYNOPSIS -.nf -.B "#include " - -.BI "int versioncmp(const char *" va ", const char *" vb ");" -.fi -.SH DESCRIPTION -The -.B versioncmp -function compares version strings. -.PP -The format of version numbers considered is -.IP -.RI [ epoch -.BR : ] -.I main -.RB [ \- -.IR sub ] -.PP -The -.I main -part may contain colons or hyphens if there is an -.I epoch -or -.IR sub , -respectively. Version strings are compared componentwise: first epochs, -then main parts, and finally subparts. -.PP -The component comparison is done as follows. First, the initial -subsequence of nondigit characters is extracted from each string, and -these are compared lexicographically, using ASCII ordering, except that -letters precede non-letters. If both are the same, an initial sequence -of digits is extracted from the remaining parts of the version strings, -and these are compared numerically (an empty sequence being considered -to have the value zero). This process is repeated until we have a -winner or until both strings are exhausted. -.PP -The return value is 0 if the two strings are equal, \-1 if -.I va -is older than -.IR vb , -or +1 if -.I va -is newer than -.IR vb . -.SH SEE ALSO -.BR mLib (3). -.PP -.IR "Debian Policy Manual" . -.SH AUTHOR -Mark Wooding,