diff options
Diffstat (limited to 'fstobdf.c')
-rw-r--r-- | fstobdf.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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 <stdio.h> #include <stdlib.h> #include <string.h> @@ -54,8 +58,10 @@ usage(const char *progName, const char *msg) { if (msg) fprintf(stderr, "%s: %s\n", progName, msg); - fprintf(stderr, "Usage: %s [-server <font server>] -fn <font name>\n", - progName); + fprintf(stderr, + "Usage: %s [-server <font server>] -fn <font name>\n" + " or: %s -version\n", + progName, progName); exit(0); } @@ -99,6 +105,10 @@ main(int argc, char *argv[]) else usage(argv[0], "-fn requires an argument"); } + else if (!strcmp(argv[i], "-version")) { + printf("%s\n", PACKAGE_STRING); + exit(0); + } } if (fontName == NULL) |