diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-08 23:21:32 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-22 22:30:45 -0800 |
commit | 43ab9b11699acadbf09b8ed050a7a2f7e630dce4 (patch) | |
tree | defb1ad1320825ee0828816781177a2081dd3160 | |
parent | e5788db7f179bf89d2e5e3c97c69058027cb93bd (diff) |
Add -v flag to print program version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | man/mkfontscale.man | 5 | ||||
-rw-r--r-- | mkfontscale.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/man/mkfontscale.man b/man/mkfontscale.man index 4aa88ab..cb18458 100644 --- a/man/mkfontscale.man +++ b/man/mkfontscale.man @@ -38,6 +38,8 @@ mkfontscale \- create an index of scalable font files for X ] [ .B \-u | \-U ] [ +.B \-v +] [ .B \-\- ] [ .I directory @@ -132,6 +134,9 @@ is useful when generating encoding directories only. disable (\fI-u\fP) or enable (\fI-U\fP) indexing of ISO 10646:1 font encodings (default: enabled). .TP +.B \-v +print program version and exit. +.TP .B \-\- end of options. .SH SEE ALSO diff --git a/mkfontscale.c b/mkfontscale.c index 1194145..d73df8c 100644 --- a/mkfontscale.c +++ b/mkfontscale.c @@ -120,7 +120,7 @@ usage(void) "mkfontscale [ -b ] [ -s ] [ -o filename ] [-x suffix ]\n" " [ -a encoding ] [ -f fuzz ] [ -l ]\n" " [ -e directory ] [ -p prefix ] [ -n ] [ -r ] \n" - " [-u] [-U] [ directory ]...\n"); + " [-u] [-U] [-v] [ directory ]...\n"); } int @@ -238,6 +238,9 @@ main(int argc, char **argv) argn++; } else if (strcmp(argv[argn], "-n") == 0) { argn++; + } else if (strcmp(argv[argn], "-v") == 0) { + printf("%s\n", PACKAGE_STRING); + exit(0); } else { usage(); exit(1); |