=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/main.c,v retrieving revision 1.17 retrieving revision 1.18 diff -c -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 **** ! /* $Id: main.c,v 1.17 2009/10/21 19:13:50 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: main.c,v 1.18 2009/10/27 21:40:07 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 75,81 **** out_man outman; out_free outfree; void *outdata; ! char *outopts; }; static int foptions(int *, char *); --- 75,81 ---- out_man outman; out_free outfree; void *outdata; ! char outopts[BUFSIZ]; }; static int foptions(int *, char *); *************** *** 111,117 **** curp.outtype = OUTT_ASCII; /* LINTED */ ! while (-1 != (c = getopt(argc, argv, "f:m:o:T:VW:"))) switch (c) { case ('f'): if ( ! foptions(&curp.fflags, optarg)) --- 111,117 ---- curp.outtype = OUTT_ASCII; /* LINTED */ ! while (-1 != (c = getopt(argc, argv, "f:m:O:T:VW:"))) switch (c) { case ('f'): if ( ! foptions(&curp.fflags, optarg)) *************** *** 121,128 **** if ( ! moptions(&curp.inttype, optarg)) return(EXIT_FAILURE); break; ! case ('o'): ! curp.outopts = optarg; break; case ('T'): if ( ! toptions(&curp.outtype, optarg)) --- 121,129 ---- if ( ! moptions(&curp.inttype, optarg)) return(EXIT_FAILURE); break; ! case ('O'): ! (void)strlcat(curp.outopts, optarg, BUFSIZ); ! (void)strlcat(curp.outopts, ",", BUFSIZ); break; case ('T'): if ( ! toptions(&curp.outtype, optarg)) *************** *** 208,215 **** { (void)fprintf(stderr, "usage: %s [-V] [-foption...] " ! "[-mformat] [-Toutput] [-Werr...]\n", ! __progname); exit(EXIT_FAILURE); } --- 209,216 ---- { (void)fprintf(stderr, "usage: %s [-V] [-foption...] " ! "[-mformat] [-Ooption] [-Toutput] " ! "[-Werr...]\n", __progname); exit(EXIT_FAILURE); }