| 1 |
(******************************************************************************) |
| 2 |
(* This file is part of the Dose library http://www.irill.org/software/dose *) |
| 3 |
(* *) |
| 4 |
(* Copyright (C) 2009-2011 Pietro Abate <[email protected]> *) |
| 5 |
(* *) |
| 6 |
(* All rights reserved. This file is distributed under the terms of the *) |
| 7 |
(* GNU Lesser General Public License version 2.1, with the special *) |
| 8 |
(* exception on linking described in the file LICENSE. *) |
| 9 |
(* *) |
| 10 |
(* Work developed with the support of the Mancoosi Project *) |
| 11 |
(* http://www.mancoosi.org *) |
| 12 |
(* *) |
| 13 |
(******************************************************************************) |
| 14 |
|
| 15 |
(** Version comparison function used throughout. From the Dose suite. *) |
| 16 |
|
| 17 |
(** Functions for manipulating and comparing Debian version strings. |
| 18 |
Compliant with Debian policy version 3.9.2. and Debian developers |
| 19 |
reference version 3.4.6 *) |
| 20 |
|
| 21 |
(** {2 Comparing debian version strings} *) |
| 22 |
|
| 23 |
(** The following functions compare any two strings, that is these |
| 24 |
functions do not check whether the arguments are really legal |
| 25 |
debian versions. If the arguments are debian version strings, then |
| 26 |
the result is as required by debian policy. Note that two strings |
| 27 |
may be equivalent, that is denote the same debian version, even |
| 28 |
when they differ in syntax, as for instance "0:1.2.00" and |
| 29 |
"1.02-0". |
| 30 |
*) |
| 31 |
|
| 32 |
(** @return [true] iff the two strings define the same version. Hence, |
| 33 |
the result may be true even when the two string differ |
| 34 |
syntactically. *) |
| 35 |
val equal : string -> string -> bool |
| 36 |
|
| 37 |
(** [compare x y] returns 0 if x is eqivalent to y, -1 if x is smaller |
| 38 |
than y, and 1 if x is greater than y. This is consistent with |
| 39 |
[Stdlib.compare]. *) |
| 40 |
val compare : string -> string -> int |