diff options
author | Patrick Roth <roth@stettbacher.ch> | 2019-10-22 12:56:59 +0200 |
---|---|---|
committer | Patrick Roth <roth@stettbacher.ch> | 2019-10-22 12:56:59 +0200 |
commit | 744732fb4ff701ca6da9fcde60a7da6d9e0dbb11 (patch) | |
tree | 8384383ee118b4fcb35e5b5a19a717746c3515e6 /color_pipe.c | |
parent | Version upgrade to 1.0.1 (diff) | |
download | o3000-color-pipe-744732fb4ff701ca6da9fcde60a7da6d9e0dbb11.tar.gz o3000-color-pipe-744732fb4ff701ca6da9fcde60a7da6d9e0dbb11.zip |
Library version defined in CMakeLists.txt
Current library version can be requested with function
color_pipe_get_version().
Diffstat (limited to 'color_pipe.c')
-rw-r--r-- | color_pipe.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/color_pipe.c b/color_pipe.c index 986989f..0f7ae32 100644 --- a/color_pipe.c +++ b/color_pipe.c @@ -967,3 +967,21 @@ int __stdcall color_pipe_close(struct color_pipe_t *data) { free(data); return 0; } + + +/** + * Return library version. + * + * @param major On return: major number + * @param minor On return: minor number + * @param release On return: release number + */ +void __stdcall color_pipe_get_version(int *major, int *minor, int *release) { + if(major == NULL || minor == NULL || release == NULL) { + printf("%s: at least one version variable is NULL!\n", __func__); + return; + } + *major = PIPE_VERSION_MAJOR; + *minor = PIPE_VERSION_MINOR; + *release = PIPE_VERSION_RELEASE; +} |