version 1.84, 2010/06/07 10:52:44 |
version 1.87, 2010/06/12 10:09:19 |
|
|
OUTT_TREE, |
OUTT_TREE, |
OUTT_HTML, |
OUTT_HTML, |
OUTT_XHTML, |
OUTT_XHTML, |
OUTT_LINT |
OUTT_LINT, |
|
OUTT_PS |
}; |
}; |
|
|
struct curparse { |
struct curparse { |
Line 142 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 143 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"macro requires argument(s)", |
"macro requires argument(s)", |
"no title in document", |
"no title in document", |
"missing list type", |
"missing list type", |
|
"missing display type", |
"line argument(s) will be lost", |
"line argument(s) will be lost", |
"body argument(s) will be lost", |
"body argument(s) will be lost", |
"column syntax is inconsistent", |
"column syntax is inconsistent", |
"missing font type", |
"missing font type", |
"missing display type", |
|
"displays may not be nested", |
"displays may not be nested", |
|
"unsupported display type", |
"no scope to rewind: syntax violated", |
"no scope to rewind: syntax violated", |
"scope broken, syntax violated", |
"scope broken, syntax violated", |
"line scope broken, syntax violated", |
"line scope broken, syntax violated", |
Line 584 fdesc(struct curparse *curp) |
|
Line 586 fdesc(struct curparse *curp) |
|
switch (curp->outtype) { |
switch (curp->outtype) { |
case (OUTT_XHTML): |
case (OUTT_XHTML): |
curp->outdata = xhtml_alloc(curp->outopts); |
curp->outdata = xhtml_alloc(curp->outopts); |
curp->outman = html_man; |
|
curp->outmdoc = html_mdoc; |
|
curp->outfree = html_free; |
|
break; |
break; |
case (OUTT_HTML): |
case (OUTT_HTML): |
curp->outdata = html_alloc(curp->outopts); |
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->outman = html_man; |
curp->outmdoc = html_mdoc; |
curp->outmdoc = html_mdoc; |
curp->outfree = html_free; |
curp->outfree = html_free; |
Line 598 fdesc(struct curparse *curp) |
|
Line 614 fdesc(struct curparse *curp) |
|
curp->outman = tree_man; |
curp->outman = tree_man; |
curp->outmdoc = tree_mdoc; |
curp->outmdoc = tree_mdoc; |
break; |
break; |
case (OUTT_LINT): |
case (OUTT_ASCII): |
break; |
/* FALLTHROUGH */ |
default: |
case (OUTT_PS): |
curp->outdata = ascii_alloc(curp->outopts); |
|
curp->outman = terminal_man; |
curp->outman = terminal_man; |
curp->outmdoc = terminal_mdoc; |
curp->outmdoc = terminal_mdoc; |
curp->outfree = terminal_free; |
|
break; |
break; |
|
default: |
|
break; |
} |
} |
} |
} |
|
|
Line 729 toptions(struct curparse *curp, char *arg) |
|
Line 745 toptions(struct curparse *curp, char *arg) |
|
curp->outtype = OUTT_HTML; |
curp->outtype = OUTT_HTML; |
else if (0 == strcmp(arg, "xhtml")) |
else if (0 == strcmp(arg, "xhtml")) |
curp->outtype = OUTT_XHTML; |
curp->outtype = OUTT_XHTML; |
|
else if (0 == strcmp(arg, "ps")) |
|
curp->outtype = OUTT_PS; |
else { |
else { |
fprintf(stderr, "%s: Bad argument\n", arg); |
fprintf(stderr, "%s: Bad argument\n", arg); |
return(0); |
return(0); |