summaryrefslogtreecommitdiffstats
path: root/mmain.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-06 14:13:47 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-06 14:13:47 +0000
commitbc942b21e65675353944cc575b047c6a80080195 (patch)
tree1b072ecd73ada8d8dda604f7c050fe83b272dabd /mmain.c
parentc0584f0a6b55bd89fdb730f06598436ff3b2c184 (diff)
downloadmandoc-bc942b21e65675353944cc575b047c6a80080195.tar.gz
Strings abstracted into dynamically-created C files.
Added -V option. Deprecated README files.
Diffstat (limited to 'mmain.c')
-rw-r--r--mmain.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mmain.c b/mmain.c
index 45c93611..f585992a 100644
--- a/mmain.c
+++ b/mmain.c
@@ -109,7 +109,7 @@ mmain_getopt(struct mmain *p, int argc, char *argv[],
extern int optind;
- sz = strlcpy(opts, "vW:", 32);
+ sz = strlcpy(opts, "VvW:", 32);
assert(sz < 32);
if (u) {
@@ -125,18 +125,21 @@ mmain_getopt(struct mmain *p, int argc, char *argv[],
case ('v'):
p->dbg++;
break;
+ case ('V'):
+ (void)printf("%s %s\n", __progname, VERSION);
+ return(0);
case ('W'):
if ( ! getsopts(p, optarg))
- return(0);
+ return(-1);
break;
case ('?'):
mmain_usage(help);
- return(0);
+ return(-1);
default:
assert(getopt_cb);
if ((*getopt_cb)(arg, c, optarg))
break;
- return(0);
+ return(-1);
}
argv += optind;