Version Information

Version Information — Compile-time and run-time version checks.

Functions

Types and Values

Includes

#include <abydos.h>

Description

Functions

ABYDOS_ENCODE_VERSION()

#define             ABYDOS_ENCODE_VERSION(major,minor,micro)

This macro encodes the given version into an integer. The numbers returned by ABYDOS_VERSION and abydos_version() are encoded using this macro. Two encoded version numbers can be compared as integers. The encoding ensures that later versions compare greater than earlier versions.


ABYDOS_CHECK_VERSION()

#define ABYDOS_CHECK_VERSION(major,minor,micro) (ABYDOS_ENCODE_VERSION(major,minor,micro) >= ABYDOS_VERSION)

Checks the compile-time version of abydos. Use abydos_check_version() for a run-time version check.

Parameters

major

the major version to check for

 

minor

the minor version to check for

 

micro

the micro version to check for

 

Returns

non zero if the compile-time version of abydos is the same as or newer than the passed-in version.


abydos_version ()

int
abydos_version (void);

The run-time version of abydos, encoded using ABYDOS_ENCODE_VERSION().


abydos_major_version ()

int
abydos_major_version (void);

abydos_micro_version ()

int
abydos_micro_version (void);

The run-time micro version of abydos.


abydos_minor_version ()

int
abydos_minor_version (void);

abydos_version_string ()

const char *
abydos_version_string (void);

The run-time version of abydos as a string.


abydos_check_version ()

int
abydos_check_version (int major,
                      int minor,
                      int micro);

Checks the run-time version of abydos. Use ABYDOS_CHECK_VERSION() for a compile-time version check.

Parameters

major

the major version to check for

 

minor

the minor version to check for

 

micro

the micro version to check for

 

Returns

non zero if the run-time version of abydos is the same as or newer than the passed-in version.

Types and Values

ABYDOS_VERSION

#define ABYDOS_VERSION ABYDOS_ENCODE_VERSION(0,1,4)

The compile-time version of abydos, encoded using ABYDOS_ENCODE_VERSION().


ABYDOS_VERSION_MAJOR

#define ABYDOS_VERSION_MAJOR 0

The compile-time major version of abydos (currently 0).


ABYDOS_VERSION_MICRO

#define ABYDOS_VERSION_MICRO 4

The compile-time micro version of abydos (currently 4).


ABYDOS_VERSION_MINOR

#define ABYDOS_VERSION_MINOR 1

The compile-time minor version of abydos (currently 1).


ABYDOS_VERSION_STRING

#define ABYDOS_VERSION_STRING "0.1.4"

The compile-time version of abydos as a string (currently "0.1.4").