summaryrefslogtreecommitdiff
path: root/xlsclients.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-19 00:45:13 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-19 00:45:13 -0700
commita67a804a43ad75efb3040c9e9e067fc60cde1256 (patch)
tree71862043b20177a3f3c12f8bea181369547c1cd8 /xlsclients.c
parent81a64c9112b9d650106a01d8bcd246011d037bc2 (diff)
Add -version flag to print version from PACKAGE_STRING
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xlsclients.c')
-rw-r--r--xlsclients.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xlsclients.c b/xlsclients.c
index 5b7ccad..4574010 100644
--- a/xlsclients.c
+++ b/xlsclients.c
@@ -68,7 +68,8 @@ static void
usage(void)
{
fprintf (stderr,
- "usage: %s [-display dpy] [-m len] [-[a][l]]\n", ProgramName);
+ "usage: %s [-display dpy] [-m len] [-[a][l]] [-version]\n",
+ ProgramName);
exit (1);
}
@@ -168,6 +169,9 @@ main(int argc, char *argv[])
if (++i >= argc) usage ();
maxcmdlen = atoi (argv[i]);
continue;
+ case 'v': /* -version */
+ printf("%s\n", PACKAGE_STRING);
+ exit(0);
}
for (cp = &arg[1]; *cp; cp++) {