=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/main.c,v retrieving revision 1.35 retrieving revision 1.36 diff -c -r1.35 -r1.36 *** src/usr.bin/mandoc/main.c 2010/06/08 00:11:47 1.35 --- src/usr.bin/mandoc/main.c 2010/06/10 22:50:10 1.36 *************** *** 1,4 **** ! /* $Id: main.c,v 1.35 2010/06/08 00:11:47 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: main.c,v 1.36 2010/06/10 22:50:10 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 54,60 **** OUTT_TREE, OUTT_HTML, OUTT_XHTML, ! OUTT_LINT }; struct curparse { --- 54,61 ---- OUTT_TREE, OUTT_HTML, OUTT_XHTML, ! OUTT_LINT, ! OUTT_PS }; struct curparse { *************** *** 573,584 **** switch (curp->outtype) { case (OUTT_XHTML): curp->outdata = xhtml_alloc(curp->outopts); - curp->outman = html_man; - curp->outmdoc = html_mdoc; - curp->outfree = html_free; break; case (OUTT_HTML): curp->outdata = html_alloc(curp->outopts); curp->outman = html_man; curp->outmdoc = html_mdoc; curp->outfree = html_free; --- 574,599 ---- switch (curp->outtype) { case (OUTT_XHTML): curp->outdata = xhtml_alloc(curp->outopts); break; case (OUTT_HTML): curp->outdata = html_alloc(curp->outopts); + break; + case (OUTT_ASCII): + curp->outdata = ascii_alloc(curp->outopts); + curp->outfree = ascii_free; + break; + case (OUTT_PS): + curp->outdata = ps_alloc(); + curp->outfree = ps_free; + break; + default: + break; + } + + switch (curp->outtype) { + case (OUTT_HTML): + /* FALLTHROUGH */ + case (OUTT_XHTML): curp->outman = html_man; curp->outmdoc = html_mdoc; curp->outfree = html_free; *************** *** 587,600 **** curp->outman = tree_man; curp->outmdoc = tree_mdoc; break; ! case (OUTT_LINT): ! break; ! default: ! curp->outdata = ascii_alloc(curp->outopts); curp->outman = terminal_man; curp->outmdoc = terminal_mdoc; - curp->outfree = terminal_free; break; } } --- 602,615 ---- curp->outman = tree_man; curp->outmdoc = tree_mdoc; break; ! case (OUTT_ASCII): ! /* FALLTHROUGH */ ! case (OUTT_PS): curp->outman = terminal_man; curp->outmdoc = terminal_mdoc; break; + default: + break; } } *************** *** 718,723 **** --- 733,740 ---- curp->outtype = OUTT_HTML; else if (0 == strcmp(arg, "xhtml")) curp->outtype = OUTT_XHTML; + else if (0 == strcmp(arg, "ps")) + curp->outtype = OUTT_PS; else { fprintf(stderr, "%s: Bad argument\n", arg); return(0);