KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches

Run-time checks against KOS's current version. More...

Functions

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

Run-time checks against KOS's current version.

This API provides several utility functions to check for a particular exact, min, or max run-time version for KOS.

They are meant to be used as conditional expressions as such:

if(kos_version_min(2, 0, 0))
// Do something requiring at least KOS 2.0.0 to compile.
else if(kos_version_below(2, 5, 1))
// Do something that was deprecated in KOS 2.5.1.
else if(kos_version_is(3, 1, 2))
// Do something for an exact version match.
bool kos_version_min(uint8_t major, uint16_t minor, uint8_t patch)
Minimum 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.
bool kos_version_is(uint8_t major, uint16_t minor, uint8_t patch)
Exact version run-time check for KOS.

Function Documentation

◆ kos_version_above()

bool kos_version_above ( uint8_t major,
uint16_t minor,
uint8_t patch )

Above version run-time check for KOS.

Check whether the current run-time version of KOS is above the given version.

Parameters
majorMajor version component.
minorMinor version component.
patchPatch version component.
Return values
trueKOS is above the given version.
falseKOS is at or below the given version.

◆ kos_version_below()

bool kos_version_below ( uint8_t major,
uint16_t minor,
uint8_t patch )

Below version run-time check for KOS.

Checks whether the current run-time version of KOS is below the given version.

Parameters
majorMajor version component.
minorMinor version component.
patchPatch version component.
Return values
trueKOS is below the given version.
falseKOS is at or above the given version.

◆ kos_version_is()

bool kos_version_is ( uint8_t major,
uint16_t minor,
uint8_t patch )

Exact version run-time check for KOS.

Checks whether the current run-time version of KOS matches the given version.

Parameters
majorMajor version component.
minorMinor version component.
patchPatch version component.
Return values
trueThe version matches exactly.
falseThe version does not match.

◆ kos_version_max()

bool kos_version_max ( uint8_t major,
uint16_t minor,
uint8_t patch )

Maximum version run-time check for KOS.

Checks whether the current run-time version of KOS is at most the given version.

Parameters
majorMajor version component.
minorMinor version component.
patchPatch version component.
Return values
trueKOS is at or below the maximum version.
falseKOS is above the maximum version.

◆ kos_version_min()

bool kos_version_min ( uint8_t major,
uint16_t minor,
uint8_t patch )

Minimum version run-time check for KOS.

Check whether the current run-time version of KOS is at least the given version.

Parameters
majorMajor version component.
minorMinor version component.
patchpatch version component.
Return values
trueKOS is at or above the minimum version.
falseKOS is below teh minimum version.