summaryrefslogtreecommitdiff
path: root/demo.c
diff options
context:
space:
mode:
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>2018-06-05 14:57:16 -0400
committerLeo (Sunpeng) Li <sunpeng.li@amd.com>2018-06-06 10:53:45 -0400
commitdf829a038ba13a3e57f3d90e13265d4e1438a230 (patch)
tree6b285bee6c99e54aeb1ca55834849cd725f3334b /demo.c
parent753df28925555b2d9030b6666b4a9a8c4eab065c (diff)
Add versioningHEADmaster
Diffstat (limited to 'demo.c')
-rw-r--r--demo.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/demo.c b/demo.c
index 743eaf4..51f5f75 100644
--- a/demo.c
+++ b/demo.c
@@ -34,6 +34,7 @@
#include <X11/Xatom.h>
#include <X11/extensions/Xrandr.h>
+#define VERSION_STRING "alpha-v3"
#define LUT_SIZE 4096
@@ -553,6 +554,11 @@ static void print_short_help()
free(short_help);
}
+static void print_version()
+{
+ printf("%s\n", VERSION_STRING);
+}
+
int main(int argc, char *const argv[])
@@ -587,8 +593,12 @@ int main(int argc, char *const argv[])
int ctm_changed;
int regamma_changed, regamma_is_srgb;
- while ((opt = getopt(argc, argv, "ho:d:c:r:")) != -1) {
- if (opt == 'd')
+ while ((opt = getopt(argc, argv, "vho:d:c:r:")) != -1) {
+ if (opt == 'v') {
+ print_version();
+ return 0;
+ }
+ else if (opt == 'd')
degamma_opt = optarg;
else if (opt == 'c')
ctm_opt = optarg;