aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Two more macros (.Ap and .In) do trailing delimiter handling.Ingo Schwarze2012-11-161-3/+4
| | | | | | | This fixes the end of sentence spacing in OpenBSD open(2) and in about 150 pages in the NetBSD base system. Reported by Nicolas Joly <njoly a pasteur point fr>, merci!
* Improve formatting of badly nested font blocks.Ingo Schwarze2012-11-163-10/+11
| | | | | | | | | | | | | | | | | The basic idea is to already pop the font at the end marker instead of allowing it to linger until the final end of the block. This requires a few preliminaries: * For each block, save a pointer to the previous font to be used in case the block breaks another and gets extended. * That requires making node information writable during rendering. * Now fonts may get popped in the wrong order; hence, after the stack has already been rewound further by some block that began earlier, ignore popping a font that was put on the stack later. * To be able to exploit all this for font blocks, tie processing to their body, not their block, which is more logical anyway. Triggered by florian@ reporting vaguely similar issues with list blocks.
* Fix a crash triggered by .Bl -tag .It Xo .El .Sh found by florian@.Ingo Schwarze2012-11-162-3/+6
| | | | | | | | | | | | | | | * When allocating a body end marker, copy the pointer to the normalized block information from the body block, avoiding the risk of subsequent null pointer derefence. * When inserting the body end marker into the syntax tree, do not try to copy that pointer from the parent block, because not being a direkt child of the block it belongs to is the whole point of a body end marker. * Even non-callable blocks (like Bd and Bl) can break other blocks; when this happens, postpone closing them out in the usual way. Completed and tested at the OpenBSD impromptu Coimbra hackathon (c2k12). Thanks to Pedro Almeida and the Laborat'orio de Computa,c~ao Avan,cada da Universidade de Coimbra (http://www.uc.pt/lca) for their hospitality!
* crash caused by .Ta outside .BlIngo Schwarze2012-11-041-1/+11
|
* freeciv wants .UR/.UE too; from bentley@Ingo Schwarze2012-10-311-1/+3
|
* minor EOS issue reported by Nicolas JolyIngo Schwarze2012-10-121-1/+9
|
* 1) Remove documentation of the groff-1.15 compatibility quirkIngo Schwarze2012-08-291-12/+6
| | | | | | | | | | | of suppressing spacing before a third .Xr argument because that quirk was removed in mdoc_macro.c rev. 1.113. 2) Mark the "section" argument to .Xr as (syntactically) optional, but still do not encourage omitting it. The missing .Op was reported by espie@. Wording tweaked by and ok jmc@, ok millert@.
* .Sq should use curly right quotes in HTML output to match its curlyIngo Schwarze2012-08-121-4/+4
| | | | | | | | | left quotes. Also, properly reinitialize the styles attribute string buffer for each column in a table so that the attributes don't accumulate. Patch from Matthew@ Dempsky, tweaked by me; OpenBSD rev. 1.66.
* document .PD; related to man_term.c rev. 1.134Ingo Schwarze2012-07-291-3/+34
| | | | OpenBSD man.7 rev. 1.30
* Implement .PD for -Tascii.Ingo Schwarze2012-07-292-15/+38
| | | | | | Reminded about the missing feature by millert@. This reduces mandoc/groff differences in OpenBSD base by 25%. ok millert@
* Drop empty .IP such that is does not cause additional vertical spacing.Ingo Schwarze2012-07-182-23/+23
| | | | | Issue first reported by naddy@ in rsync(1). OpenBSD rev. 1.55.
* Drop .sp and .br right after .SH and .SS.Ingo Schwarze2012-07-182-17/+21
| | | | | | | Fixes vertical spacing after "OPTIONS" in gcc(1). Issue first reported by naddy@ in rsync(1). OpenBSD rev. 1.54.
* Let a trailing .Ns macro take effectIngo Schwarze2012-07-182-12/+10
| | | | | | | | even on an input line containing a partial implicit macro. Fixes horizontal spacing in vi(1), ddb(4), and ppp(8). OpenBSD rev. 1.74.
* Fix handling of paragraph macros inside lists:Ingo Schwarze2012-07-186-18/+51
| | | | | | | * When they are trailing the last item, move them outside the list. * When they are trailing any other none-compact item, drop them. OpenBSD rev. mdoc_validate.c 1.107, mdoc.c 1.91
* The mdoc(7) \*(Ba predefined string actually forces roman font;Ingo Schwarze2012-07-183-17/+5
| | | | | | | | | | | | that's stupid because it may break enclosing font changes, but let's do the same for groff bug compatibility. --> Never use \*(Ba, use just plain "|"! <-- Also, predefined strings are already expanded by the roff(7) parser, so the mdoc(7) parser has to look for the expanded string. OpenBSD rev. mdoc.c 1.90 and predefs.in 1.3
* Always fix the man(7) subsection header (.SS) indent to 3n,Ingo Schwarze2012-07-161-2/+2
| | | | | | | do not let it depend on the default indent provided by -Oindent. By default, this doesn't change anything because 7 / 2 = 3; in -Omdoc mode, it makes man(7) output the same as mdoc(7) output. OpenBSD rev. 1.87
* In flush-left mode of both man(7) and mdoc(7), when an output line is brokenIngo Schwarze2012-07-162-5/+10
| | | | | at the position of a literal tab, the tab indents the following line. Fixes the perl(1) SYNOPSIS; reminded by deraadt@; OpenBSD rev. 1.66.
* For .El .sp, avoid the weird .sp -1v .PP .PP output sequence.Ingo Schwarze2012-07-161-3/+4
| | | | Synching to OpenBSD rev. 1.38.
* Several -mdoc parser improvements related to vertical spacing:Ingo Schwarze2012-07-163-11/+45
| | | | | | | | | | * So far, .Pp and .Lp were removed before paragraph type blocks. * Now also remove .br before paragraph type blocks. * Treat .Lp as a paragraph like .Pp, so remove .Pp, .Lp, .br before it. * Do not treat .sp as a paragraph, don't remove anything before it. * After .Sh, .Ss, .Pp, and .Lp, remove .Pp, .Lp, .sp, .br, and blank lines. * After .sp and .br, remove .br. OpenBSD rev. mdoc.c 1.89 and mdoc_validate.c 1.106
* Translate blank input lines to .sp just like in mdoc(7),Ingo Schwarze2012-07-142-7/+19
| | | | | | and ignore .sp after .PP. This fixes vertical spacing for blank lines after .PP and for .sp after .PP. OpenBSD rev. man.c 1.68 and man_term.c 1.86
* In -Tman .Bl -compact, skip the blank line only before the first itemIngo Schwarze2012-07-141-2/+3
| | | | | of the first list in a section, not before every item of the first list. OpenBSD rev. 1.37
* Adjust -Tman SYNOPSIS .Nm indentation using .HP; requested by millert@.Ingo Schwarze2012-07-131-2/+11
| | | | | There are still lots of ugly line breaks, to be fixed later. OpenBSD rev. 1.36
* If the tag in .Bl -tag .It would leave exactly one blank before theIngo Schwarze2012-07-131-28/+55
| | | | | | | | | body of the item, mdoc(7) breaks the line, whereas the .TP used to translate this to man(7) does not. Thus, insert an explicit roff(7) line break in this place. To be able to correctly count the characters, do not pass font escapes an the like through print_word(). OpenBSD rev. 1.35
* In -man -Tascii, support .sp with negative argument.Ingo Schwarze2012-07-132-74/+102
| | | | | | In -mdoc -Tman, improve the framework to control vertical spacing. Use both to support .Bl -compact (surprisingly hard to get right). OpenBSD rev. 1.85 and 1.34, respectively.
* The post_nm() validation function crashed when the first .Nm child nodeIngo Schwarze2012-07-123-17/+22
| | | | | | | | | | was a non-text node. Fix this by rewriting post_nm() to always set the meta name to UNKNOWN when the name is missing or unusable. While here, make MANDOCERR_NONAME an ERROR, as it usually renders the page content unintelligible. Bug reported by Maxim <Belooussov at gmail dot com>, thanks. OpenBSD rev. 1.105
* Do not crash in -Tman on:Ingo Schwarze2012-07-121-9/+16
| | | | | | | * .Fn with exactly one argument * .Bl -hang without a -width Now all 3776 OpenBSD base manuals build without crashing. OpenBSD rev. 1.33
* Polish -Tman .Rs support.Ingo Schwarze2012-07-111-28/+68
| | | | | All mdoc(7) macros are now supported by -Tman. OpenBSD rev. 1.32
* fix position and formatting of %U;Ingo Schwarze2012-07-112-5/+5
| | | | OpenBSD rev. 1.104 and 1.145, respectively
* basic implementation of -Tman .Bl -column using tbl(7); OpenBSD rev. 1.31Ingo Schwarze2012-07-111-6/+42
|
* basic implementation of -Tman .Bl -tagIngo Schwarze2012-07-101-6/+6
| | | | | while here, do some minor outflags cleanup OpenBSD rev. 1.30
* multiple fixes to -Tascii .HP rendering:Ingo Schwarze2012-07-102-41/+58
| | | | | | | | | | | | | | | | | | * do not add an excessive blank line before the block * in literal mode, start a new line after the tag getting this to work requires some general (print_man_node) fixes: * in literal mode, break the output line at the end of each input line, not just after those input lines ending in text * but don't break it when there was no output on the line * and adjust the margins after the .HP tag these general fixes require an adjustment to -Tascii .TP rendering: * set up NOBREAK mode before the body, not after the head finally, based on all this, implement -Tman .Bl -hang in terms of .HP OpenBSD rev. 1.84 and 1.29, respectively
* Remove a hack that was intended for groff-1.15 bug compatibility:Ingo Schwarze2012-07-101-7/+2
| | | | | | | | When the width of a tag in .Bl -hang was exactly one character shorter than the maximum length that would fit, the following text would have a negative hang of one character (i.e., hang to the left). That bug is no longer present in groff-1.21, so relax mandoc, too. OpenBSD rev. 1.65
* * implement -Tman .Bl -item -inset -diag -ohang -dash -hyphen -enum .ItIngo Schwarze2012-07-104-23/+153
| | | | | | | | | | * fix -Tman .Bl -bullet .It * adjust the -Tascii .Bl -bullet -dash -hyphen .It default and minimum width to new groff standards, it changed from 4n (in groff 1.15) to 2n (in groff 1.21) * same for -Tascii -enum, it changed from 5n to 2n * use -hang formatting for -Tascii -enum -width 2n * for -Tascii -enum, the default is -width 3n
* fix -Tascii .Fd line breakingIngo Schwarze2012-07-092-20/+37
| | | | | and implement -Tman .Fd OpenBSD rev. 1.27 and 1.143, respectively
* implement -Tman .Eo and .Ec; OpenBSD rev. 1.26Ingo Schwarze2012-07-091-4/+13
|
* Implement -Tman .Bf.Ingo Schwarze2012-07-091-6/+42
| | | | | | | | To get the spacing right, * avoid man(7) code line breaks at places where no spacing is allowed * allow spacing right after .Sm on * allow spacing after empty .Fl at the end of an input line OpenBSD rev. 1.25
* fix -Tman font handling for:Ingo Schwarze2012-07-091-67/+147
| | | | | | .Ad .Ar .Cd .Cm .Dv .Em .Er .Ev .Fa .Fl .Fn .Fo .Ft .Ic .In .Lk .Li .Ms .Mt .Nm .Pa .Sx .Sy .Tn .Va .Vt OpenBSD rev. 1.24
* implement -Tman .No and .Mt; OpenBSD rev. 1.23Ingo Schwarze2012-07-091-15/+27
|
* fix .Lk for -Tascii and implement it for -TmanIngo Schwarze2012-07-082-19/+47
| | | | OpenBSD rev. 1.22 and 1.142, respectively
* fix vertical spacing for -Tman SYNOPSIS .Fn .Fo .Ft .In .Nm .Va .VtIngo Schwarze2012-07-081-12/+65
| | | | OpenBSD rev. 1.21
* implement -Tman .AnIngo Schwarze2012-07-082-3/+33
| | | | | also reset -[no]split mode at .Sh AUTHORS in -Tascii OpenBSD rev. 1.20 and 1.141, respectively
* Add flags to insert a .sp or .br request before the next output,Ingo Schwarze2012-07-081-50/+30
| | | | | | shortening some frequent idioms and preparing for better vertical spacing in the SYNOPSIS; no functional change intended. OpenBSD rev. 1.19
* Instead of adding one integer variable for each global boolean output flagIngo Schwarze2012-07-081-181/+177
| | | | | | | and passing around a structure containing them into each and every function, just use a single static bitfield. In preparation for adding more output flags to support more features. OpenBSD rev. 1.18
* implement -Tman .VaIngo Schwarze2012-07-081-3/+3
| | | | | and fix -Tman .Vt for the non-SYNOPSIS case OpenBSD rev. 1.17
* implement -Tman .Vt; OpenBSD rev. 1.15 and 1.16Ingo Schwarze2012-07-081-2/+42
|
* Basic implementation of -Tman .Fo and .Fa;Ingo Schwarze2012-07-081-17/+82
| | | | | | | again, some blank lines still missing from the output. While here, remove the trailing semicolon from .Fn when outside .Sh SYNOPSIS. OpenBSD rev. 1.14
* rudimentary support for -Tman .Ft and .Fn;Ingo Schwarze2012-07-071-3/+49
| | | | | some blank lines are still missing from the output OpenBSD rev. 1.13
* basic support for -Tman .In; OpenBSD rev. 1.12Ingo Schwarze2012-07-071-2/+33
|
* after .Lb in library section, break the line in the final outputIngo Schwarze2012-07-071-2/+14
|
* implement -Tman .Bk; OpenBSD rev. 1.10Ingo Schwarze2012-07-071-5/+36
|