=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/main.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- src/usr.bin/mandoc/main.c 2009/10/21 19:13:50 1.17 +++ src/usr.bin/mandoc/main.c 2009/10/27 21:40:07 1.18 @@ -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 * @@ -75,7 +75,7 @@ out_man outman; out_free outfree; void *outdata; - char *outopts; + char outopts[BUFSIZ]; }; static int foptions(int *, char *); @@ -111,7 +111,7 @@ 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 @@ 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 @@ { (void)fprintf(stderr, "usage: %s [-V] [-foption...] " - "[-mformat] [-Toutput] [-Werr...]\n", - __progname); + "[-mformat] [-Ooption] [-Toutput] " + "[-Werr...]\n", __progname); exit(EXIT_FAILURE); }