summaryrefslogtreecommitdiff
path: root/xlsfonts.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 23:20:51 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 23:20:51 -0700
commitde4d0b6138f35acd12d1206cdd292376418a02c1 (patch)
tree5b4bed210d2187aa390aea21605c2b89988a40a9 /xlsfonts.c
parenta0b3cf16cdd208ca9b0c86631999df047cbe8817 (diff)
Add -version option to print program version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xlsfonts.c')
-rw-r--r--xlsfonts.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlsfonts.c b/xlsfonts.c
index 0f45450..21bccc6 100644
--- a/xlsfonts.c
+++ b/xlsfonts.c
@@ -26,6 +26,10 @@ in this Software without prior written authorization from The Open Group.
* */
/* $XFree86: xc/programs/xlsfonts/xlsfonts.c,v 1.9 2003/09/08 14:25:33 eich Exp $ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
@@ -90,6 +94,7 @@ void usage(const char *errmsg)
" -n columns number of columns if multi column\n"
" -display displayname X server to contact\n"
" -d displayname (alias for -display displayname)\n"
+ " -v print program version\n"
"\n");
Close_Display();
exit(EXIT_FAILURE);
@@ -149,6 +154,9 @@ int main(int argc, char **argv)
case 'u':
sort_output = False;
break;
+ case 'v':
+ puts(PACKAGE_STRING);
+ exit(0);
default:
fprintf (stderr, "%s: unrecognized argument -%c\n\n",
program_name, argv[0][i]);