Lines Matching refs:curp

85 	struct curparse	 curp;  in main()  local
96 memset(&curp, 0, sizeof(struct curparse)); in main()
99 curp.outtype = OUTT_ASCII; in main()
100 curp.wlevel = MANDOCLEVEL_FATAL; in main()
124 (void)strlcat(curp.outopts, optarg, BUFSIZ); in main()
125 (void)strlcat(curp.outopts, ",", BUFSIZ); in main()
128 if ( ! toptions(&curp, optarg)) in main()
132 if ( ! woptions(&curp, optarg)) in main()
143 curp.mp = mparse_alloc(type, curp.wlevel, mmsg, &curp, defos); in main()
148 if (OUTT_MAN == curp.outtype) in main()
149 mparse_keep(curp.mp); in main()
157 parse(&curp, STDIN_FILENO, "<stdin>", &rc); in main()
160 parse(&curp, -1, *argv, &rc); in main()
161 if (MANDOCLEVEL_OK != rc && curp.wstop) in main()
166 if (curp.outfree) in main()
167 (*curp.outfree)(curp.outdata); in main()
168 if (curp.mp) in main()
169 mparse_free(curp.mp); in main()
201 parse(struct curparse *curp, int fd, in parse() argument
213 rc = mparse_readfd(curp->mp, fd, file); in parse()
225 if (MANDOCLEVEL_OK != rc && curp->wstop) in parse()
230 if ( ! (curp->outman && curp->outmdoc)) { in parse()
231 switch (curp->outtype) { in parse()
233 curp->outdata = xhtml_alloc(curp->outopts); in parse()
234 curp->outfree = html_free; in parse()
237 curp->outdata = html_alloc(curp->outopts); in parse()
238 curp->outfree = html_free; in parse()
241 curp->outdata = utf8_alloc(curp->outopts); in parse()
242 curp->outfree = ascii_free; in parse()
245 curp->outdata = locale_alloc(curp->outopts); in parse()
246 curp->outfree = ascii_free; in parse()
249 curp->outdata = ascii_alloc(curp->outopts); in parse()
250 curp->outfree = ascii_free; in parse()
253 curp->outdata = pdf_alloc(curp->outopts); in parse()
254 curp->outfree = pspdf_free; in parse()
257 curp->outdata = ps_alloc(curp->outopts); in parse()
258 curp->outfree = pspdf_free; in parse()
264 switch (curp->outtype) { in parse()
268 curp->outman = html_man; in parse()
269 curp->outmdoc = html_mdoc; in parse()
272 curp->outman = tree_man; in parse()
273 curp->outmdoc = tree_mdoc; in parse()
276 curp->outmdoc = man_mdoc; in parse()
277 curp->outman = man_man; in parse()
288 curp->outman = terminal_man; in parse()
289 curp->outmdoc = terminal_mdoc; in parse()
296 mparse_result(curp->mp, &mdoc, &man); in parse()
300 if (man && curp->outman) in parse()
301 (*curp->outman)(curp->outdata, man); in parse()
302 if (mdoc && curp->outmdoc) in parse()
303 (*curp->outmdoc)(curp->outdata, mdoc); in parse()
307 mparse_reset(curp->mp); in parse()
332 toptions(struct curparse *curp, char *arg) in toptions() argument
336 curp->outtype = OUTT_ASCII; in toptions()
338 curp->outtype = OUTT_LINT; in toptions()
339 curp->wlevel = MANDOCLEVEL_WARNING; in toptions()
341 curp->outtype = OUTT_TREE; in toptions()
343 curp->outtype = OUTT_MAN; in toptions()
345 curp->outtype = OUTT_HTML; in toptions()
347 curp->outtype = OUTT_UTF8; in toptions()
349 curp->outtype = OUTT_LOCALE; in toptions()
351 curp->outtype = OUTT_XHTML; in toptions()
353 curp->outtype = OUTT_PS; in toptions()
355 curp->outtype = OUTT_PDF; in toptions()
365 woptions(struct curparse *curp, char *arg) in woptions() argument
381 curp->wstop = 1; in woptions()
386 curp->wlevel = MANDOCLEVEL_WARNING; in woptions()
389 curp->wlevel = MANDOCLEVEL_ERROR; in woptions()
392 curp->wlevel = MANDOCLEVEL_FATAL; in woptions()