On 02/10/2011 17:40, Joerg Sonnenberger wrote: > On Sun, Oct 02, 2011 at 05:04:18PM +0200, Kristaps Dzonsons wrote: >> Hi, >> >> What sort of behaviour is most reasonable when providing a man >> manual to the new -Tman? I think this should be ironed out before >> the release. The mandoc manual says "-Tman only with mdoc" and, if >> man is provided to -Tman, outputs nothing (like -Tlint). >> >> It makes the most sense to me to output the original file (after >> preprocessing, I guess). All this requires is a duplicate buffer in >> read.c (conditional on -Tman being present to avoid overhead in >> normal usage). I don't like the idea of putting out an error (or >> nothing at all) because it special-cases modes for input. > > Agreed, just giving back the original input (maybe reformatted) sounds > like the best approach. Putting some code to the idea... (Sorry for the churn, I ordered the mandoc.h functions. They're the same except for the mandoc_keep() and mandoc_getkeep() additions). This isn't quite commit-ready, but a start. Basically, I ask for a keep buffer if OUTT_MAN is specified. This needed some machinery to expose the parser to the front-end. Thoughts?