Lines Matching defs:outst

127 	struct outstate	 outst;		/* Output state. */
212 memset(&outst, 0, sizeof(outst));
213 outst.tag_files = NULL;
214 outst.outtype = OUTT_LOCALE;
215 outst.use_pager = 1;
234 outst.use_pager = 0;
241 outst.use_pager = 0;
299 outst.outtype = OUTT_ASCII;
301 outst.outtype = OUTT_LINT;
305 outst.outtype = OUTT_TREE;
307 outst.outtype = OUTT_MAN;
309 outst.outtype = OUTT_HTML;
311 outst.outtype = OUTT_MARKDOWN;
313 outst.outtype = OUTT_UTF8;
315 outst.outtype = OUTT_LOCALE;
317 outst.outtype = OUTT_PS;
319 outst.outtype = OUTT_PDF;
327 if (woptions(optarg, &os_e, &outst.wstop) == -1)
349 outst.use_pager = 0;
382 if (outst.outtype != OUTT_TREE || conf.output.noval == 0)
390 outst.use_pager = 0;
392 if (outst.use_pager &&
403 if (outst.use_pager == 0)
659 process_onefile(mp, res + i, startdir, &outst, &conf);
660 if (outst.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)
671 if (outst.outdata != NULL) {
672 switch (outst.outtype) {
674 html_free(outst.outdata);
679 ascii_free(outst.outdata);
683 pspdf_free(outst.outdata);
698 if (outst.tag_files != NULL) {
702 run_pager(&outst, conf.output.tag);
704 } else if (outst.had_output && outst.outtype != OUTT_LINT)
913 struct outstate *outst, struct manconf *conf)
939 if (outst->use_pager) {
940 outst->use_pager = 0;
941 outst->tag_files = term_tag_init(conf->output.outfilename,
942 outst->outtype == OUTT_HTML ? ".html" : "",
954 if (outst->had_output && outst->outtype <= OUTT_UTF8) {
955 if (outst->outdata == NULL)
956 outdata_alloc(outst, &conf->output);
957 terminal_sepline(outst->outdata);
961 parse(mp, fd, resp->file, outst, conf);
964 outst->had_output = 1;
968 if (outst->tag_files != NULL) {
970 outst->tag_files->ofn, strerror(errno));
972 outst->tag_files = NULL;
982 struct outstate *outst, struct manconf *conf)
1006 if (outst->wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)
1009 if (outst->outdata == NULL)
1010 outdata_alloc(outst, &conf->output);
1011 else if (outst->outtype == OUTT_HTML)
1012 html_reset(outst->outdata);
1019 outst->had_output = 1;
1021 switch (outst->outtype) {
1023 html_mdoc(outst->outdata, meta);
1026 tree_mdoc(outst->outdata, meta);
1029 man_mdoc(outst->outdata, meta);
1036 terminal_mdoc(outst->outdata, meta);
1039 markdown_mdoc(outst->outdata, meta);
1046 switch (outst->outtype) {
1048 html_man(outst->outdata, meta);
1051 tree_man(outst->outdata, meta);
1061 terminal_man(outst->outdata, meta);
1112 outdata_alloc(struct outstate *outst, struct manoutput *outconf)
1114 switch (outst->outtype) {
1116 outst->outdata = html_alloc(outconf);
1119 outst->outdata = utf8_alloc(outconf);
1122 outst->outdata = locale_alloc(outconf);
1125 outst->outdata = ascii_alloc(outconf);
1128 outst->outdata = pdf_alloc(outconf);
1131 outst->outdata = ps_alloc(outconf);
1264 run_pager(struct outstate *outst, char *tag_target)
1271 outst->tag_files->tcpgid =
1286 outst->tag_files->tcpgid = tc_pgid;
1297 pager_pid = spawn_pager(outst, tag_target);
1318 spawn_pager(struct outstate *outst, char *tag_target)
1332 assert(outst->tag_files->ofd == -1);
1333 assert(outst->tag_files->tfs == NULL);
1359 if (*outst->tag_files->tfn != '\0' &&
1364 argv[argc++] = mandoc_strdup(outst->tag_files->tfn);
1374 if (outst->outtype == OUTT_HTML && tag_target != NULL)
1376 outst->tag_files->ofn, tag_target);
1378 argv[argc] = mandoc_strdup(outst->tag_files->ofn);
1401 outst->tag_files->pager_pid = pager_pid;