Lines Matching refs:outst
127 struct outstate outst; /* Output state. */ in main() local
209 memset(&outst, 0, sizeof(outst)); in main()
210 outst.tag_files = NULL; in main()
211 outst.outtype = OUTT_LOCALE; in main()
212 outst.use_pager = 1; in main()
231 outst.use_pager = 0; in main()
238 outst.use_pager = 0; in main()
290 outst.outtype = OUTT_ASCII; in main()
292 outst.outtype = OUTT_LINT; in main()
296 outst.outtype = OUTT_TREE; in main()
298 outst.outtype = OUTT_MAN; in main()
300 outst.outtype = OUTT_HTML; in main()
302 outst.outtype = OUTT_MARKDOWN; in main()
304 outst.outtype = OUTT_UTF8; in main()
306 outst.outtype = OUTT_LOCALE; in main()
308 outst.outtype = OUTT_PS; in main()
310 outst.outtype = OUTT_PDF; in main()
318 if (woptions(optarg, &os_e, &outst.wstop) == -1) in main()
340 outst.use_pager = 0; in main()
373 if (outst.outtype != OUTT_TREE || conf.output.noval == 0) in main()
381 outst.use_pager = 0; in main()
383 if (outst.use_pager && in main()
394 if (outst.use_pager == 0) in main()
619 process_onefile(mp, res + i, startdir, &outst, &conf); in main()
620 if (outst.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK) in main()
631 if (outst.outdata != NULL) { in main()
632 switch (outst.outtype) { in main()
634 html_free(outst.outdata); in main()
639 ascii_free(outst.outdata); in main()
643 pspdf_free(outst.outdata); in main()
658 if (outst.tag_files != NULL) { in main()
662 run_pager(&outst, conf.output.tag); in main()
664 } else if (outst.had_output && outst.outtype != OUTT_LINT) in main()
870 struct outstate *outst, struct manconf *conf) in process_onefile() argument
896 if (outst->use_pager) { in process_onefile()
897 outst->use_pager = 0; in process_onefile()
898 outst->tag_files = term_tag_init(conf->output.outfilename, in process_onefile()
899 outst->outtype == OUTT_HTML ? ".html" : "", in process_onefile()
911 if (outst->had_output && outst->outtype <= OUTT_UTF8) { in process_onefile()
912 if (outst->outdata == NULL) in process_onefile()
913 outdata_alloc(outst, &conf->output); in process_onefile()
914 terminal_sepline(outst->outdata); in process_onefile()
918 parse(mp, fd, resp->file, outst, conf); in process_onefile()
921 outst->had_output = 1; in process_onefile()
925 if (outst->tag_files != NULL) { in process_onefile()
927 outst->tag_files->ofn, strerror(errno)); in process_onefile()
929 outst->tag_files = NULL; in process_onefile()
939 struct outstate *outst, struct manconf *conf) in parse() argument
963 if (outst->wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK) in parse()
966 if (outst->outdata == NULL) in parse()
967 outdata_alloc(outst, &conf->output); in parse()
968 else if (outst->outtype == OUTT_HTML) in parse()
969 html_reset(outst->outdata); in parse()
976 outst->had_output = 1; in parse()
978 switch (outst->outtype) { in parse()
980 html_mdoc(outst->outdata, meta); in parse()
983 tree_mdoc(outst->outdata, meta); in parse()
986 man_mdoc(outst->outdata, meta); in parse()
993 terminal_mdoc(outst->outdata, meta); in parse()
996 markdown_mdoc(outst->outdata, meta); in parse()
1003 switch (outst->outtype) { in parse()
1005 html_man(outst->outdata, meta); in parse()
1008 tree_man(outst->outdata, meta); in parse()
1018 terminal_man(outst->outdata, meta); in parse()
1069 outdata_alloc(struct outstate *outst, struct manoutput *outconf) in outdata_alloc() argument
1071 switch (outst->outtype) { in outdata_alloc()
1073 outst->outdata = html_alloc(outconf); in outdata_alloc()
1076 outst->outdata = utf8_alloc(outconf); in outdata_alloc()
1079 outst->outdata = locale_alloc(outconf); in outdata_alloc()
1082 outst->outdata = ascii_alloc(outconf); in outdata_alloc()
1085 outst->outdata = pdf_alloc(outconf); in outdata_alloc()
1088 outst->outdata = ps_alloc(outconf); in outdata_alloc()
1221 run_pager(struct outstate *outst, char *tag_target) in run_pager() argument
1228 outst->tag_files->tcpgid = in run_pager()
1243 outst->tag_files->tcpgid = tc_pgid; in run_pager()
1254 pager_pid = spawn_pager(outst, tag_target); in run_pager()
1275 spawn_pager(struct outstate *outst, char *tag_target) in spawn_pager() argument
1288 assert(outst->tag_files->ofd == -1); in spawn_pager()
1289 assert(outst->tag_files->tfs == NULL); in spawn_pager()
1320 if (*outst->tag_files->tfn != '\0' && in spawn_pager()
1325 argv[argc++] = outst->tag_files->tfn; in spawn_pager()
1335 if (outst->outtype == OUTT_HTML && tag_target != NULL) in spawn_pager()
1337 outst->tag_files->ofn, tag_target); in spawn_pager()
1339 argv[argc] = outst->tag_files->ofn; in spawn_pager()
1360 outst->tag_files->pager_pid = pager_pid; in spawn_pager()