5 * version - helper functions for major.minor-style version numbers
7 * This code provides some helper functions to deal with version numbers in
8 * the form major.minor.
10 * Author: Peter Hutterer <peter.hutterer@who-t.net>
11 * Maintainer: Peter Hutterer <peter.hutterer@who-t.net>
15 * struct version a = version(1, 0);
16 * struct version b = version(2, 2);
18 * if (version_cmp(a, b) < 0)
19 * printf("Feature supported in version 2.2 but we have %d.%d\n",
20 * version_major(a), version_minor(a));
22 * if (version_cmp(a, version(3, 4)) < 0)
23 * printf("Feature only supported in version 3.4\n");
26 int main(int argc, char *argv[])
28 /* Expect exactly one argument */
32 if (strcmp(argv[1], "depends") == 0) {