diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-04 23:31:29 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-22 22:28:11 -0800 |
commit | 8d60a7198cc366d72fd03a5821de9b56719588fc (patch) | |
tree | d694ba42fe75ca30aa5d2487f7494305ebc722b7 /fslsfonts.c | |
parent | 5e7991fdcb98c06702a364b856a31541874c51da (diff) |
Add -version option to print version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'fslsfonts.c')
-rw-r--r-- | fslsfonts.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fslsfonts.c b/fslsfonts.c index 6ff6a2d..9de741e 100644 --- a/fslsfonts.c +++ b/fslsfonts.c @@ -43,6 +43,10 @@ in this Software without prior written authorization from The Open Group. * THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <X11/fonts/FSlib.h> #include <stdio.h> #include <X11/Xos.h> @@ -101,6 +105,7 @@ usage(void) " -w width maximum width for multiple columns\n" " -n columns number of columns if multi column\n" " -server servername font server to contact\n" + " -version print command version and exit\n" "\n"); exit(1); } @@ -120,6 +125,10 @@ main(int argc, char *argv[]) usage(); servername = argv[i]; } + else if (strcmp(argv[i], "-version") == 0) { + printf("%s\n", PACKAGE_STRING); + exit(0); + } } if ((svr = FSOpenServer(servername)) == NULL) { |