diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-18 16:34:25 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-18 16:34:25 +0000 |
commit | 19dfb5cab356150bf46d159f43ead732a6a6ade5 (patch) | |
tree | 79243b72064d2dfc284d040592d6f69b6a983ad7 /main.c | |
parent | 87a05fb3c50ab6e9a1befb22c6e63e3e47f571f3 (diff) | |
download | mandoc-19dfb5cab356150bf46d159f43ead732a6a6ade5.tar.gz |
Profit from the unified struct roff_man and reduce the number of
arguments of mparse_result() by one. No functional change.
Written on the ICE Bruxelles-Koeln on the way back from p2k15.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -632,7 +632,6 @@ static void parse(struct curparse *curp, int fd, const char *file) { enum mandoclevel rctmp; - struct roff_man *mdoc; struct roff_man *man; /* Begin by parsing the file itself. */ @@ -720,14 +719,16 @@ parse(struct curparse *curp, int fd, const char *file) } } - mparse_result(curp->mp, &mdoc, &man, NULL); + mparse_result(curp->mp, &man, NULL); /* Execute the out device, if it exists. */ - if (man && curp->outman) + if (man == NULL) + return; + if (curp->outmdoc != NULL && man->macroset == MACROSET_MDOC) + (*curp->outmdoc)(curp->outdata, man); + if (curp->outman != NULL && man->macroset == MACROSET_MAN) (*curp->outman)(curp->outdata, man); - if (mdoc && curp->outmdoc) - (*curp->outmdoc)(curp->outdata, mdoc); } static void |