summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-03-28 16:18:43 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-03-28 16:18:43 +0000
commitc79fa29e239fe9fbc6d3a8c2e71f630a8a8518d5 (patch)
tree19c70e9d62cfeb7a00592b7bf519db90e97952e9
parent301fcb7f99e5f0dd68697a7a835fa5cec7a89883 (diff)
downloadmandoc-c79fa29e239fe9fbc6d3a8c2e71f630a8a8518d5.tar.gz
Even though the HTML, man, markdown, PDF, PostScript, and tree formatters
never write a ctags(1) file, using a pager still requires writing the main output file and passing the file name to the pager. Recent regression mentioned on IRC and reported by kn@.
-rw-r--r--main.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/main.c b/main.c
index e3848843..8084663f 100644
--- a/main.c
+++ b/main.c
@@ -609,8 +609,7 @@ main(int argc, char *argv[])
(void)fchdir(startdir);
close(startdir);
}
- if (outst.outtype <= OUTT_UTF8)
- term_tag_finish();
+ term_tag_finish();
if (outst.outdata != NULL) {
switch (outst.outtype) {
case OUTT_HTML:
@@ -832,16 +831,14 @@ process_onefile(struct mparse *mp, struct manpage *resp, int startdir,
} else
fd = STDIN_FILENO;
- if (outst->outtype <= OUTT_UTF8) {
- if (outst->use_pager) {
- outst->use_pager = 0;
- outst->tag_files = term_tag_init(conf->output.tag);
- }
- if (outst->had_output) {
- if (outst->outdata == NULL)
- outdata_alloc(outst, &conf->output);
- terminal_sepline(outst->outdata);
- }
+ if (outst->use_pager) {
+ outst->use_pager = 0;
+ outst->tag_files = term_tag_init(conf->output.tag);
+ }
+ if (outst->had_output && outst->outtype <= OUTT_UTF8) {
+ if (outst->outdata == NULL)
+ outdata_alloc(outst, &conf->output);
+ terminal_sepline(outst->outdata);
}
if (resp->form == FORM_SRC)