diff options
Diffstat (limited to 'usr.bin/mandoc/main.c')
-rw-r--r-- | usr.bin/mandoc/main.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index 2b2d9bd0b06..f88798c383a 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.17 2009/10/21 19:13:50 schwarze Exp $ */ +/* $Id: main.c,v 1.18 2009/10/27 21:40:07 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -75,7 +75,7 @@ struct curparse { out_man outman; out_free outfree; void *outdata; - char *outopts; + char outopts[BUFSIZ]; }; static int foptions(int *, char *); @@ -111,7 +111,7 @@ main(int argc, char *argv[]) curp.outtype = OUTT_ASCII; /* LINTED */ - while (-1 != (c = getopt(argc, argv, "f:m:o:T:VW:"))) + while (-1 != (c = getopt(argc, argv, "f:m:O:T:VW:"))) switch (c) { case ('f'): if ( ! foptions(&curp.fflags, optarg)) @@ -121,8 +121,9 @@ main(int argc, char *argv[]) if ( ! moptions(&curp.inttype, optarg)) return(EXIT_FAILURE); break; - case ('o'): - curp.outopts = optarg; + case ('O'): + (void)strlcat(curp.outopts, optarg, BUFSIZ); + (void)strlcat(curp.outopts, ",", BUFSIZ); break; case ('T'): if ( ! toptions(&curp.outtype, optarg)) @@ -208,8 +209,8 @@ usage(void) { (void)fprintf(stderr, "usage: %s [-V] [-foption...] " - "[-mformat] [-Toutput] [-Werr...]\n", - __progname); + "[-mformat] [-Ooption] [-Toutput] " + "[-Werr...]\n", __progname); exit(EXIT_FAILURE); } |