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