diff options
-rw-r--r-- | man/xgamma.man | 6 | ||||
-rw-r--r-- | xgamma.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/man/xgamma.man b/man/xgamma.man index d6662f7..1cb33d1 100644 --- a/man/xgamma.man +++ b/man/xgamma.man @@ -23,7 +23,7 @@ xgamma - Alter a monitor's gamma correction through the X server .SH SYNOPSIS .B "xgamma" -[-display \fIdisplay\fP] [-screen \fIscreen\fP] [-quiet] +[-display \fIdisplay\fP] [-screen \fIscreen\fP] [-quiet] [-version] [-gamma f.f | [[-rgamma f.f] [-ggamma f.f] [-bgamma f.f]]] .SH DESCRIPTION .PP @@ -62,6 +62,10 @@ Silence the normal output of Print out the `Usage:' command syntax summary. .PP .TP 8 +.B "-version" +Print out the program version and exit. +.PP +.TP 8 .B "-gamma f.f" The gamma correction can either be defined as a single value, or separately for the red, green and blue components. This argument @@ -22,6 +22,10 @@ * Written by David Bateman */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <stdio.h> #include <errno.h> #include <X11/Xos.h> @@ -54,6 +58,7 @@ Syntax(const char *errmsg) " -display host:dpy or -d\n" " -quiet or -q\n" " -screen or -s\n" + " -version or -v\n" " -gamma f.f Gamma Value\n" " -rgamma f.f Red Gamma Value\n" " -ggamma f.f Green Gamma Value\n" @@ -113,6 +118,9 @@ main(int argc, char *argv[]) } else if (isabbreviation ("-quiet", arg, 1)) { quiet = True; continue; + } else if (isabbreviation ("-version", arg, 1)) { + puts(PACKAGE_STRING); + exit(0); } else if (isabbreviation ("-screen", arg, 1)) { if (++i >= argc) Syntax ("-screen requires an argument"); screen = atoi(argv[i]); |