Lines Matching defs:outst

127 	struct outstate	 outst;		/* Output state. */
211 memset(&outst, 0, sizeof(outst));
212 outst.tag_files = NULL;
213 outst.outtype = OUTT_LOCALE;
214 outst.use_pager = 1;
233 outst.use_pager = 0;
240 outst.use_pager = 0;
298 outst.outtype = OUTT_ASCII;
300 outst.outtype = OUTT_LINT;
304 outst.outtype = OUTT_TREE;
306 outst.outtype = OUTT_MAN;
308 outst.outtype = OUTT_HTML;
310 outst.outtype = OUTT_MARKDOWN;
312 outst.outtype = OUTT_UTF8;
314 outst.outtype = OUTT_LOCALE;
316 outst.outtype = OUTT_PS;
318 outst.outtype = OUTT_PDF;
326 if (woptions(optarg, &os_e, &outst.wstop) == -1)
348 outst.use_pager = 0;
381 if (outst.outtype != OUTT_TREE || conf.output.noval == 0)
389 outst.use_pager = 0;
391 if (outst.use_pager &&
402 if (outst.use_pager == 0)
639 process_onefile(mp, res + i, &outst, &conf);
640 if (outst.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)
647 if (outst.outdata != NULL) {
648 switch (outst.outtype) {
650 html_free(outst.outdata);
655 ascii_free(outst.outdata);
659 pspdf_free(outst.outdata);
674 if (outst.tag_files != NULL) {
678 run_pager(&outst, conf.output.tag);
680 } else if (outst.had_output && outst.outtype != OUTT_LINT)
889 struct outstate *outst, struct manconf *conf)
913 if (outst->use_pager) {
914 outst->use_pager = 0;
915 outst->tag_files = term_tag_init(conf->output.outfilename,
916 outst->outtype == OUTT_HTML ? ".html" : "",
928 if (outst->had_output && outst->outtype <= OUTT_UTF8) {
929 if (outst->outdata == NULL)
930 outdata_alloc(outst, &conf->output);
931 terminal_sepline(outst->outdata);
935 parse(mp, fd, resp->file, outst, conf);
938 outst->had_output = 1;
942 if (outst->tag_files != NULL) {
944 outst->tag_files->ofn, strerror(errno));
946 outst->tag_files = NULL;
956 struct outstate *outst, struct manconf *conf)
974 if (outst->wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)
977 if (outst->outdata == NULL)
978 outdata_alloc(outst, &conf->output);
979 else if (outst->outtype == OUTT_HTML)
980 html_reset(outst->outdata);
987 outst->had_output = 1;
989 switch (outst->outtype) {
991 html_mdoc(outst->outdata, meta);
994 tree_mdoc(outst->outdata, meta);
997 man_mdoc(outst->outdata, meta);
1004 terminal_mdoc(outst->outdata, meta);
1007 markdown_mdoc(outst->outdata, meta);
1014 switch (outst->outtype) {
1016 html_man(outst->outdata, meta);
1019 tree_man(outst->outdata, meta);
1029 terminal_man(outst->outdata, meta);
1080 outdata_alloc(struct outstate *outst, struct manoutput *outconf)
1082 switch (outst->outtype) {
1084 outst->outdata = html_alloc(outconf);
1087 outst->outdata = utf8_alloc(outconf);
1090 outst->outdata = locale_alloc(outconf);
1093 outst->outdata = ascii_alloc(outconf);
1096 outst->outdata = pdf_alloc(outconf);
1099 outst->outdata = ps_alloc(outconf);
1232 run_pager(struct outstate *outst, char *tag_target)
1239 outst->tag_files->tcpgid =
1254 outst->tag_files->tcpgid = tc_pgid;
1265 pager_pid = spawn_pager(outst, tag_target);
1286 spawn_pager(struct outstate *outst, char *tag_target)
1300 assert(outst->tag_files->ofd == -1);
1301 assert(outst->tag_files->tfs == NULL);
1327 if (*outst->tag_files->tfn != '\0' &&
1332 argv[argc++] = mandoc_strdup(outst->tag_files->tfn);
1342 if (outst->outtype == OUTT_HTML && tag_target != NULL)
1344 outst->tag_files->ofn, tag_target);
1346 argv[argc] = mandoc_strdup(outst->tag_files->ofn);
1369 outst->tag_files->pager_pid = pager_pid;