aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/version.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/version.c b/src/version.c
index 6f8bc50..b4b213c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -34,3 +34,24 @@ int const gdbm_version_number[3] = {
GDBM_VERSION_MINOR,
GDBM_VERSION_PATCH
};
+
+int
+gdbm_version_cmp (int const a[], int const b[])
+{
+ if (a[0] > b[0])
+ return 1;
+ else if (a[0] < b[0])
+ return -1;
+
+ if (a[1] > b[1])
+ return 1;
+ else if (a[1] < b[1])
+ return -1;
+
+ if (a[2] > b[2])
+ return 1;
+ else if (a[2] < b[2])
+ return -1;
+
+ return 0;
+}

Return to:

Send suggestions and report system problems to the System administrator.