aboutsummaryrefslogtreecommitdiffstats
path: root/color_pipe.c
diff options
context:
space:
mode:
authorPatrick Roth <roth@stettbacher.ch>2019-10-22 12:56:59 +0200
committerPatrick Roth <roth@stettbacher.ch>2019-10-22 12:56:59 +0200
commit744732fb4ff701ca6da9fcde60a7da6d9e0dbb11 (patch)
tree8384383ee118b4fcb35e5b5a19a717746c3515e6 /color_pipe.c
parentVersion upgrade to 1.0.1 (diff)
downloado3000-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.c18
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;
+}