Browse Source Download (without any required ccan dependencies)

Module:

version

Summary:

helper functions for major.minor-style version numbers

Maintainer:

Peter Hutterer <peter.hutterer@who-t.net>

Author:

Peter Hutterer <peter.hutterer@who-t.net>

Description:

This code provides some helper functions to deal with version numbers in the form major.minor.

Example:

struct version a = version(1, 0);
struct version b = version(2, 2);

if (version_cmp(a, b) < 0)
        printf("Feature supported in version 2.2 but we have %d.%d\n",
                version_major(a), version_minor(a));

if (version_cmp(a, version(3, 4)) < 0)
        printf("Feature only supported in version 3.4\n");

License:

BSD-MIT