summaryrefslogtreecommitdiffstats
path: root/manconf.h
Commit message (Collapse)AuthorAgeFilesLines
* undocumented options -O outfilename and -O tagfilenameIngo Schwarze2020-07-211-0/+2
| | | | | to support regression testing without a tty; no user visible change intended
* When the last file formatted yielded no tags, the tags file gotIngo Schwarze2020-04-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | deleted before starting the pager, even when earlier input files had written to it; thanks to weerd@ for reporting that bug. Since we now generate tags for section headers, we almost always generate at least some. Consequently, while fixing the above bug, simplify the code by never deleting the tags file before the pager exits, not even in the rare case that the file happens to be empty. Hence, this patch is -75 +63 LOC even though it fixes two bugs. While deleting the output files belongs after exit from the pager, closing them should be done before it is started. Collect the related code, which was scattered in various places, to where it belongs, in a dedicated function in the term_tag.c module. As a side benefit, never fclose(2) stdout, only dup2(2) to it. Similarly, when the -O tag argument wasn't found in the last file formatted, there was a complaint about "no such tag" even when the argument did occur in earlier files. Fix that by looking for a matching tag after every formatted file rather than just once at the very end. Given that command line arguments aren't properties of the file(s) being formatted, that check is a job for the main program, not for the formatters, so while fixing the check, move it from term_tag.c to main.c.
* In -T locale (the default), -T ascii, and -T utf8 mode, provide a newIngo Schwarze2018-11-221-1/+2
| | | | | | | | | | | | | | | output option -O tag[=term] to move right to the definition of "term" when opening the manual page in a pager, effectively porting the -T html fragment name feature - https://man.openbsd.org/ksh#ulimit - to the terminal. Try: $ man -O tag uvm_sysctl $ man -O tag=ulimit ksh $ man -O tag 3 compress Feature development triggered by a question from kn@. Klemens also tested, provided feedback that resulted in improvements, and provided an OK.
* Add an option -T html -O toc to add a brief table of contents nearIngo Schwarze2018-10-021-1/+2
| | | | | the top of HTML pages containing at least two non-standard sections. Suggested by Adam Kalisz and discussed with kristaps@ during EuroBSDCon 2018.
* Basic reporting of .Xrs to manual pages that don't existIngo Schwarze2017-07-011-2/+3
| | | | | | | | | | | | in the base system, inspired by mdoclint(1). We are able to do this because (1) the -mdoc parser, the -Tlint validator, and the man(1) manual page lookup code are all in the same program and (2) the mandoc.db(5) database format allows fast lookup. Feedback from, previous versions tested by, and OK jmc@. A few features will be added to this in the tree, step by step.
* In -Ttree output mode, show the BROKEN node flag andIngo Schwarze2017-02-101-0/+1
| | | | provide a -Onoval output option to show the unvalidated tree.
* warn about invalid output optionsIngo Schwarze2017-01-271-1/+1
| | | | | and error out if they occur on the command line; missing feature found in the TODO file
* In private header files, __BEGIN_DECLS and __END_DECLS are pointless.Ingo Schwarze2015-11-071-3/+0
| | | | | | | | | | | | Because these work slightly differently on different systems, they are becoming a maintenance burden in the portable version, so delete them. Besides, one of the chief design goals of the mandoc toolbox is to make sure that nothing related to documentation requires C++. Consequently, linking mandoc against any kind of C++ program would defeat the purpose and is not supported. I don't understand why kristaps@ added them in the first place.
* Parse the new man.conf(5) "output" directive.Ingo Schwarze2015-03-271-0/+51
The next step will be to actually use the parsed data.