diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-06 14:13:47 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-06 14:13:47 +0000 |
commit | bc942b21e65675353944cc575b047c6a80080195 (patch) | |
tree | 1b072ecd73ada8d8dda604f7c050fe83b272dabd /mmain.c | |
parent | c0584f0a6b55bd89fdb730f06598436ff3b2c184 (diff) | |
download | mandoc-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.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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; |