aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Unify {mdoc,man}_{alloc,reset,free}() into roff_man_{alloc,reset,free}().Ingo Schwarze2015-04-187-202/+107
| | | | | Minus 80 lines of code, no functional change. Written on the train from Koeln to Wolfsburg returning from p2k15.
* Move mdoc_hash_init() and man_hash_init() to libmandoc.hIngo Schwarze2015-04-188-23/+24
| | | | | and call them from mparse_alloc() and choose_parser(), preparing unified allocation of struct roff_man.
* Profit from the unified struct roff_man and reduce the number ofIngo Schwarze2015-04-189-88/+83
| | | | | arguments of mparse_result() by one. No functional change. Written on the ICE Bruxelles-Koeln on the way back from p2k15.
* Replace the structs mdoc and man by a unified struct roff_man.Ingo Schwarze2015-04-1826-324/+307
| | | | | Almost completely mechanical, no functional change. Written on the train from Exeter to London returning from p2k15.
* look at COHERENT troffIngo Schwarze2015-04-181-2/+5
|
* florian want <img> tags for https://tlakh.xyz/p2k15.7.htmlIngo Schwarze2015-04-161-1/+5
|
* Restore the page headers and page footers that accidentally got lostIngo Schwarze2015-04-161-7/+3
| | | | in rev. 1.225. Regression reported by florian@.
* shorten "outdated mandoc.db" warning message; requested by deraadt@Ingo Schwarze2015-04-161-5/+3
|
* Do not mistreat empty arguments to font alternating macrosIngo Schwarze2015-04-062-3/+11
| | | | as vertical spacing requests. Bug found with xmahjongg(6).
* On a new RS nesting level, the saved width starts from the defaultIngo Schwarze2015-04-061-2/+2
| | | | | width, not from the saved width of the previous level. Improves xterm(1) and XSetEventQueueOwner(3); found in transcode_filter(1).
* Use the default width for .RS without arguments.Ingo Schwarze2015-04-061-2/+4
| | | | | Reduces groff-mandoc differences in base and Xenocara by about 4%. Found while looking at wpa_supplicant(8).
* If a partial explicit block extending to the next input line followsIngo Schwarze2015-04-051-4/+16
| | | | | the end macro of a broken block, put all of it into the breaking block. Needed for example by mutella(1).
* Reduce code duplication, no functional change:Ingo Schwarze2015-04-051-51/+45
| | | | | Both partial and full implicit blocks can break explicit blocks. Put the code to handle both cases into a common function.
* Arguments to end macros of broken partial explicit blocksIngo Schwarze2015-04-051-10/+8
| | | | | | | | must go inside the breaking block. For example, in .It Ic cmd Oo .Ar optional_arg Oc Ar mandatory_arg the mandatory_arg is still inside the .It block. Used for example by mutella(1).
* allow using an alternate mandoc binaryIngo Schwarze2015-04-051-1/+2
|
* Give man(7) section and subsection headers hanging indentation.Ingo Schwarze2015-04-041-1/+13
| | | | | | Reduces groff-mandoc differences in base by about 2.5% due to various Perl manuals having long section titles. Quirk found in argtable2(3).
* Rounding rules for horizontal scaling widths are more complicated.Ingo Schwarze2015-04-046-50/+44
| | | | | | | | | | | | | There is a first rounding to basic units on the input side. After that, rounding rules differ between requests and macros. Requests round to the nearest possible character position. Macros round to the next character position to the left. Implement that by changing the return value of term_hspan() to basic units and leaving the second scaling and rounding stage to the formatters instead of doing it in the terminal handler. Improves for example argtable2(3).
* Don't allow breaking the output line after hyphens following escapeIngo Schwarze2015-04-041-1/+3
| | | | | sequences. Improves tic(1), sxpm(1), and a few Perl manuals. Quirk found by naddy@ in milter-greylist(8).
* Fix a quirk with respect to empty .HP.Ingo Schwarze2015-04-041-1/+12
| | | | | Found while writing a regression test for man_macro.c rev. 1.66. Incidentally, this brings rendering of XFreeEventData(3) closer to groff.
* Vastly simplify man(7) block unwinding, similar to mdoc_macro.c 1.171.Ingo Schwarze2015-04-031-119/+34
| | | | | Drop one enum type, two static functions, 70 lines of code. Also fixes the mpeg_encode(1) manual reported broken by naddy@.
* It turns out the man(7) parser suffers from unintelligible handlingIngo Schwarze2015-04-031-2/+2
| | | | | | | | of block rewinding, just like then mdoc(7) parser did. First step in getting rid of rew_scope(): Replace the only call where the target block is known. This commit is analogous to mdoc_macro.c rev. 1.167. One down, three to go.
* portability: word boundaries in regular expressionsIngo Schwarze2015-04-031-1/+9
|
* No need to hardcode /usr/bin/ as the path to more(1); helps portability.Ingo Schwarze2015-04-034-11/+14
| | | | | We don't hardcode the paths to gunzip(1) and cmp(1) either. Discussed with ajacoutot@.
* Third step towards parser unification:Ingo Schwarze2015-04-0217-131/+125
| | | | | Replace struct mdoc_meta and struct man_meta by a unified struct roff_meta. Written of the train from London to Exeter on the way to p2k15.
* Second step towards parser unification:Ingo Schwarze2015-04-0223-628/+597
| | | | | | | | | Replace struct mdoc_node and struct man_node by a unified struct roff_node. To be able to use the tok member for both mdoc(7) and man(7) without defining all the macros in roff.h, sacrifice a tiny bit of type safety and make tok an int rather than an enum. Almost mechanical, no functional change. Written on the Eurostar from Bruxelles to London on the way to p2k15.
* First step towards parser unification:Ingo Schwarze2015-04-0228-573/+621
| | | | | | Replace enum mdoc_type and enum man_type by a unified enum roff_type. Almost mechanical, no functional change. Written on the ICE train from Frankfurt to Bruxelles on the way to p2k15.
* Let man(1) and apropos(1) work even when the current directoryIngo Schwarze2015-04-011-36/+34
| | | | | | | is unusable: Only change back to the current directory when the directory was changed before and the next path is relative. This is now more similar to what makewhatis(8) does. Issue reported by espie@.
* Escape punctuation characters that have a different meaning in -Tpdf.Ingo Schwarze2015-03-304-58/+54
| | | | | | | | ~, `, and ' get translated to non-ASCII characters by most troff implementations when generating PostScript/PDF output. When the original ASCII character is meant, it needs to be manually escaped. Patch from bentley@.
* refering -> referring; patch from jmc@Ingo Schwarze2015-03-271-2/+2
|
* Actually use the new man.conf(5) "output" directive.Ingo Schwarze2015-03-277-128/+98
| | | | Additional functionality, yet minus 45 lines of code.
* Parse the new man.conf(5) "output" directive.Ingo Schwarze2015-03-2712-141/+221
| | | | The next step will be to actually use the parsed data.
* Modernize documentation by inserting blanks between option lettersIngo Schwarze2015-03-272-62/+59
| | | | | | and option arguments, except for -m because "-m an" and "-m andoc" look just too weird. Of course, the traditional form without the blank will continue to work.
* various tweaks from jmc@Ingo Schwarze2015-03-271-25/+18
|
* oops, forgot to apply the actual patch...Ingo Schwarze2015-03-271-1/+23
|
* Document that certain stand-alone accents need escaping in rare cases toIngo Schwarze2015-03-271-3/+3
| | | | | prevent them from being converted to Unicode replacements in PDF output. Issue found by bentley@, OK jmc@ bentley@.
* Add man.conf(5). After adding some additional functionality,Ingo Schwarze2015-03-274-2/+132
| | | | | one of the next steps will be to use it in addition to manpath(1) rather than as an alternative to it.
* Add a new directive "manpath path"Ingo Schwarze2015-03-261-26/+42
| | | | | | to replace the legacy "_whatdb path/whatis.db". Keep _whatdb support for backward compat, for now. Discussed with many, jmc@ and ajacoutot@ agree with the general direction.
* make MANPATH_DEFAULT compile-time configurableIngo Schwarze2015-03-223-3/+11
|
* when there is no -m, no -M, no MANPATH and no /etc/man.conf,Ingo Schwarze2015-03-211-2/+6
| | | | fall back to /usr/share/man:/usr/X11R6/man:/usr/local/man
* vasprintf(3) needs _GNU_SOURCE on Linux;Ingo Schwarze2015-03-201-1/+5
| | | | pointed out by Christian Neukirchen <chneukirchen at gmail dot com>.
* Patch from Christian Neukirchen <chneukirchen at gmail dot com>:Ingo Schwarze2015-03-201-3/+7
| | | | | He reports that on some platforms, it is not possible to use the same va_list twice. So use va_copy(3) for additional safety.
* The .PD macro can occur in next-line scope. Fixes zshmisc(1).Ingo Schwarze2015-03-201-2/+2
| | | | Issue reported by Christian Neukirchen <chneukirchen at gmail dot com>.
* Simplify by almost halving the number of macro flags:Ingo Schwarze2015-03-202-25/+24
| | | | | | | 1. MAN_EXPLICIT was used iff fp == blk_exp, so just test fp. 2. MAN_FSCOPED was used only for TP, so just test for TP. 3. MAN_NOCLOSE was completely unused. No functional change.
* Compat glue needed for Solaris 9 and 10.Ingo Schwarze2015-03-1910-3/+249
| | | | | | | Thanks to Sevan Janiyan <venture37 at geeklan dot co dot uk> for reporting the Solaris 10 issues, to Jan Holzhueter <jh at opencsw dot org> for some additional insight, and to OpenCSW in general for providing me with a Solaris 9/10/11 testing environment.
* We always use FTS_NOCHDIR, so delete the directory changing code.Ingo Schwarze2015-03-182-171/+16
| | | | | | This not only simplifies matters, but also helps operating systems lacking dirfd(3), for example Solaris 10. Solaris dirfd issue reported by Sevan Janiyan <venture37 at geeklan dot co dot uk>.
* Pass the CC set in configure.local to Makefile.local.Ingo Schwarze2015-03-181-0/+1
| | | | Issue found while testing on opencsw.org.
* Simplify: Now that rc is global anyway, no need to pass it aroundIngo Schwarze2015-03-171-27/+20
| | | | as an argument. No functional change.
* When the user exits the pager before the pager has drained all inputIngo Schwarze2015-03-172-3/+16
| | | | | | | | from man(1), man(1) dies from SIGPIPE. Exiting man(1) is fine in this case, generating more output would be pointless, but without handling SIGPIPE, the exit code from man(1) was wrong and csh(1) printed an ugly message "Broken pipe". Fix this by handling SIGPIPE explicitly. Issue noticed by deraadt@.
* naddy@ found a tough problem - fittingly, in cobfusc(1)...Ingo Schwarze2015-03-161-1/+14
|
* Avoid off-by-one read access to the termacts array, which couldIngo Schwarze2015-03-151-2/+3
| | | | | sometimes result in missing line breaks before subsection headers. Found by carsten dot kunze at arcor dot de on SuSE 13.2.