KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
version.h File Reference

API versioning and requirements checks. More...

#include <kos/cdefs.h>
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define KOS_VERSION_MAJOR   2
 KOS's current major revision number.
 
#define KOS_VERSION_MINOR   1
 KOS's current minor revision number.
 
#define KOS_VERSION_PATCH   0
 KOS's current patch revision number.
 
#define KOS_VERSION    KOS_VERSION_MAKE(KOS_VERSION_MAJOR, KOS_VERSION_MINOR, KOS_VERSION_PATCH)
 KOS's current version as an integer ID.
 
#define KOS_VERSION_STRING
 KOS's current version as a string literal.
 
#define KOS_VERSION_ABOVE(major, minor, patch)
 Compile-time check for being above a given KOS version.
 
#define KOS_VERSION_MIN(major, minor, patch)
 Compile-time check for a minimum KOS version.
 
#define KOS_VERSION_IS(major, minor, patch)
 Compile-time check for an exact KOS version.
 
#define KOS_VERSION_MAX(major, minor, patch)
 Compile-time check for a maximum KOS version.
 
#define KOS_VERSION_BELOW(major, minor, patch)
 Compile-time check for being below a given KOS version.
 
Version Encoding

Utilities for encoding a version from its components.

#define KOS_VERSION_MAKE(major, minor, patch)
 Creates a version identifier from its constituents.
 
#define KOS_VERSION_MAKE_STRING(major, minor, patch)
 Creates a version string from its constituents.
 
Version Checking

Utilities for creating version checks.

#define KOS_VERSION_MAKE_COMPARISON(major, minor, patch, op, version)
 Creates a generic check against a given version.
 
#define KOS_VERSION_MAKE_ABOVE(major, minor, patch, version)
 Creates a check for being above a given version.
 
#define KOS_VERSION_MAKE_MIN(major, minor, patch, version)
 Creates a minimum version check.
 
#define KOS_VERSION_MAKE_IS(major, minor, patch, version)
 Creates an exact version check.
 
#define KOS_VERSION_MAKE_MAX(major, minor, patch, version)
 Creates a maximum version check.
 
#define KOS_VERSION_MAKE_BELOW(major, minor, patch, version)
 Creates a check for being below a given version.
 

Typedefs

typedef uint32_t kos_version_t
 Type of a KOS version identifier.
 

Functions

kos_version_t kos_version (void)
 Returns the current KOS version ID at run-time.
 
const char * kos_version_string (void)
 Returns the string representation of the current KOS version at run-time.
 
bool kos_version_above (uint8_t major, uint16_t minor, uint8_t patch)
 Above version run-time check for KOS.
 
bool kos_version_min (uint8_t major, uint16_t minor, uint8_t patch)
 Minimum version run-time check for KOS.
 
bool kos_version_is (uint8_t major, uint16_t minor, uint8_t patch)
 Exact version run-time check for KOS.
 
bool kos_version_max (uint8_t major, uint16_t minor, uint8_t patch)
 Maximum version run-time check for KOS.
 
bool kos_version_below (uint8_t major, uint16_t minor, uint8_t patch)
 Below version run-time check for KOS.
 

Detailed Description

API versioning and requirements checks.

This file contains the current KOS version information as well as utilities for enforcing and checking for certain version ranges.

Author
Falco Girgis
Donald Haase
Luke Benstead