xtc_version_components(3)
---xtc_version_components(3)
decompose the xtc library version into integer components
| XTC_VERSION_COMPONENTS(3) | Library Functions Manual | XTC_VERSION_COMPONENTS(3) |
NAME
xtc_version_components —
decompose the xtc library version into integer
components
SYNOPSIS
#include
<xtc.h>
int
xtc_version_components(int
*major, int *minor,
int *patch);
DESCRIPTION
The
xtc_version_components()
function writes the SemVer
major,
minor,
and
patch
components of the library version into the integers pointed to by
major, minor, and
patch respectively.
Every output component is a non-negative integer. The components agree with the leading numeric portion of the string returned by xtc_version_string(3).
RETURN VALUES
On success the function returns XTC_OK
(0).
If any of major,
minor, or patch is
NULL, the function returns
XTC_E_INVAL without modifying any output
parameter.
EXAMPLES
#include <stdio.h>
#include <xtc.h>
int main(void) {
int maj, min, pat;
if (xtc_version_components(&maj, &min, &pat) == XTC_OK)
printf("xtc %d.%d.%d\n", maj, min, pat);
return 0;
}
SEE ALSO
HISTORY
First appeared in xtc 0.0.1.
| May 25, 2026 | Debian |