diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-10-19 22:29:41 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-10-22 20:05:59 -0700 |
commit | a248f83ea89f5d4df35fcdc1e07ef147f72c9cf6 (patch) | |
tree | f00ee67583d38af1e3974fb93215c62a73c2f843 /scope.c | |
parent | 13c3f1338ef1ed233cd3e400a6b6bd5f499be592 (diff) | |
download | xscope-a248f83ea89f5d4df35fcdc1e07ef147f72c9cf6.tar.gz |
Add -V option to print version and exit
Can't use -v, as that's already in use for verbosity level
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -670,6 +670,7 @@ Usage(void) " [-D<debug-level>]\n" " [-I] -- start in interactive mode\n" " [-S<n>] -- start/stop on SIGUSR1\n" + " [-V] -- output version information and exit\n" " [-t] -- terminate when all clients close\n"); exit(1); } @@ -727,6 +728,10 @@ ScanArgs(int argc, char **argv) ScopeEnabled = atoi(++*argv); break; + case 'V': /* print version & exit */ + printf("%s\n", PACKAGE_STRING); + exit(0); + case 'q': /* quiet mode */ XVerbose = 0; debug(1, (stderr, "Verbose = %d\n", XVerbose)); |