Lines Matching refs:outst

127 	struct outstate	 outst;		/* Output state. */
209 memset(&outst, 0, sizeof(outst));
210 outst.tag_files = NULL;
211 outst.outtype = OUTT_LOCALE;
212 outst.use_pager = 1;
231 outst.use_pager = 0;
238 outst.use_pager = 0;
296 outst.outtype = OUTT_ASCII;
298 outst.outtype = OUTT_LINT;
302 outst.outtype = OUTT_TREE;
304 outst.outtype = OUTT_MAN;
306 outst.outtype = OUTT_HTML;
308 outst.outtype = OUTT_MARKDOWN;
310 outst.outtype = OUTT_UTF8;
312 outst.outtype = OUTT_LOCALE;
314 outst.outtype = OUTT_PS;
316 outst.outtype = OUTT_PDF;
324 if (woptions(optarg, &os_e, &outst.wstop) == -1)
346 outst.use_pager = 0;
379 if (outst.outtype != OUTT_TREE || conf.output.noval == 0)
387 outst.use_pager = 0;
389 if (outst.use_pager &&
400 if (outst.use_pager == 0)
649 process_onefile(mp, res + i, startdir, &outst, &conf);
650 if (outst.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)
661 if (outst.outdata != NULL) {
662 switch (outst.outtype) {
664 html_free(outst.outdata);
669 ascii_free(outst.outdata);
673 pspdf_free(outst.outdata);
688 if (outst.tag_files != NULL) {
692 run_pager(&outst, conf.output.tag);
694 } else if (outst.had_output && outst.outtype != OUTT_LINT)
900 struct outstate *outst, struct manconf *conf)
926 if (outst->use_pager) {
927 outst->use_pager = 0;
928 outst->tag_files = term_tag_init(conf->output.outfilename,
929 outst->outtype == OUTT_HTML ? ".html" : "",
941 if (outst->had_output && outst->outtype <= OUTT_UTF8) {
942 if (outst->outdata == NULL)
943 outdata_alloc(outst, &conf->output);
944 terminal_sepline(outst->outdata);
948 parse(mp, fd, resp->file, outst, conf);
951 outst->had_output = 1;
955 if (outst->tag_files != NULL) {
957 outst->tag_files->ofn, strerror(errno));
959 outst->tag_files = NULL;
969 struct outstate *outst, struct manconf *conf)
993 if (outst->wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)
996 if (outst->outdata == NULL)
997 outdata_alloc(outst, &conf->output);
998 else if (outst->outtype == OUTT_HTML)
999 html_reset(outst->outdata);
1006 outst->had_output = 1;
1008 switch (outst->outtype) {
1010 html_mdoc(outst->outdata, meta);
1013 tree_mdoc(outst->outdata, meta);
1016 man_mdoc(outst->outdata, meta);
1023 terminal_mdoc(outst->outdata, meta);
1026 markdown_mdoc(outst->outdata, meta);
1033 switch (outst->outtype) {
1035 html_man(outst->outdata, meta);
1038 tree_man(outst->outdata, meta);
1048 terminal_man(outst->outdata, meta);
1099 outdata_alloc(struct outstate *outst, struct manoutput *outconf)
1101 switch (outst->outtype) {
1103 outst->outdata = html_alloc(outconf);
1106 outst->outdata = utf8_alloc(outconf);
1109 outst->outdata = locale_alloc(outconf);
1112 outst->outdata = ascii_alloc(outconf);
1115 outst->outdata = pdf_alloc(outconf);
1118 outst->outdata = ps_alloc(outconf);
1251 run_pager(struct outstate *outst, char *tag_target)
1258 outst->tag_files->tcpgid =
1273 outst->tag_files->tcpgid = tc_pgid;
1284 pager_pid = spawn_pager(outst, tag_target);
1305 spawn_pager(struct outstate *outst, char *tag_target)
1318 assert(outst->tag_files->ofd == -1);
1319 assert(outst->tag_files->tfs == NULL);
1350 if (*outst->tag_files->tfn != '\0' &&
1355 argv[argc++] = outst->tag_files->tfn;
1365 if (outst->outtype == OUTT_HTML && tag_target != NULL)
1367 outst->tag_files->ofn, tag_target);
1369 argv[argc] = outst->tag_files->ofn;
1390 outst->tag_files->pager_pid = pager_pid;