summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* typo; diff from fcambus@Ingo Schwarze2021-05-121-1/+1
|
* \s with arbitrary arg delimitersIngo Schwarze2021-05-121-0/+4
|
* In HTML output, correctly render .Bd -unfilled in proportionally-spacedIngo Schwarze2021-03-303-3/+7
| | | | | | | | | | | font, rather than with the monospace font appropriate for .Bd -literal. This fixes a minibug reported by anton@. Implemented by no longer relying on the typical browser default of "pre { font-family: monospace }" but instead letting <pre> elements inherit the font family from their parent, then adding an explicit CSS .Li class only for those displays where the manual page author requested it by using the -literal option on the .Bd macro.
* Append .html suffix to temporary files enabling browsers to recognise it.Ingo Schwarze2021-03-303-5/+7
| | | | | | | | | | | | | Occasionally one might read a manual page in a webbrowser, e.g. "MANPAGER=firefox man -T html jq", however temporary files created for pagers lack file extensions and most web browsers are unable to detect a file's content without it. Special case mandoc(1)'s HTML output format by appending the ".html" suffix to file names such that browsers will actually render HTML as such instead of showing it as plain text. Idea and patch from kn@, with minor help from me.
* double .TH in man(7)Ingo Schwarze2021-03-281-0/+4
|
* more about .Bd -unfilledIngo Schwarze2021-03-281-1/+6
|
* Rename syntax test of the \O escape sequence (suppress output groffIngo Schwarze2020-12-216-26/+26
| | | | | | extension; mandoc only implements syntax checking but ignores the sequence) to please Bill Gates and didickman@: avoid path names that only differ by case, like o.in vs. O.in.
* MANWIDTHIngo Schwarze2020-11-131-0/+6
|
* old groff_char(7) reported by kamil at NetBSDIngo Schwarze2020-11-121-0/+4
|
* Delete a sentence pointing to "the Predefined Strings subsectionIngo Schwarze2020-10-311-5/+0
| | | | | | of the roff(7) manual." Such a subsection does not exist, and i do not see why it should. Predefined strings are an obsolete feature of macro packages, not a feature of the roff language.
* Finally get rid of the "overflow: auto" property of ".Bl-tag > dd"Ingo Schwarze2020-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | which has long been know to cause ugly and pointless scroll bars. Matthew Martin <phy1729 at gmail dot com> helpfully explained the following two points to me: 1. What we need to do here is establish a new block formatting context such that the first line of the <dd> content moves down rather than to the right if the preceding <dt> is wide. 2. A comprehensive list of methods to establish block formatting context is available in: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context In that list, i found that "column-count: 1" does the job. It is part of CSS Multi-column Layout Level 1. While that is still in Working Draft status according to https://www.w3.org/Style/CSS/current-work , it is fully supported by all browsers according to https://developer.mozilla.org/en-US/docs/Web/CSS/column-count , probably because it was already part of the second draft of this standard almost 20 years ago: WD-css3-multicol-20010118.
* Promote section headers that can can be used unmodified as fragmentIngo Schwarze2020-10-302-2/+2
| | | | | | identifiers from TAG_WEAK to TAG_STRONG, such that for example ...#DESCRIPTION always works. Suggested by Aman Verma on the discuss@ list.
* Correct an embarrassing spelling mistake:Ingo Schwarze2020-10-281-1/+1
| | | | The last name of the author of groff is "Clark".
* Improve the HISTORY and AUTHORS sections, using informationIngo Schwarze2020-10-281-10/+21
| | | | | received from Douglas McIlroy in private mail: https://manpages.bsd.lv/history/mcilroy_26_10_2020.txt
* error message simplifications requested by deraadt@Ingo Schwarze2020-10-261-0/+4
|
* The GNU tbl(1) program contained in the groff package internallyIngo Schwarze2020-10-257-17/+6
| | | | | | | | | | | | | | | | | | uses roff(7) tabulator settings to implement tables, and it used to leak the changed tabulator settings from tables to the subsequent roff(7) code. In mandoc/tbl_term.c rev. 1.54 (June 17, 2017), code was added to be bug-compatible with groff. In commit d0e03cf6 (Oct 20, 2020), GNU tbl(1) changed behaviour to save the tabulator settings before starting a table and restore them afterwards. Adjust mandoc for compatibility. Since mandoc implements tables without using roff(7) tabulator settings, saving and restoring tabulator settings is not needed in mandoc. Simply deleting the code that changed tabulator settings by reverting tbl_term.c rev. 1.54 is sufficient in mandoc. Also adjust the desired output of the regression tests to match the new behaviour of both groff and mandoc.
* Treat \*[.T] in the same way as \*(.T rather than calling abort(3).Ingo Schwarze2020-10-248-21/+35
| | | | | Bug found because the groff-current manual pages started using the variant form of this predefined string.
* In HTML output, avoid printing a newline right after <pre>Ingo Schwarze2020-10-1613-111/+58
| | | | | | | | and right before </pre> because that resulted in vertical whitespace not requested by the manual page author. Formatting bug reported by Aman Verma <amanraoverma plus vim at gmail dot com> on discuss@.
* add missing mention of Werner Lemberg,Ingo Schwarze2020-10-141-2/+7
| | | | | noticed by Werner himself on <groff at gnu dot org>; while here, add missing .An macros
* add example to apropos.1 to list all manuals in a given section;Ingo Schwarze2020-10-011-1/+5
| | | | patch from ians@
* Element next-line scopes can nest. Consequently, even when closingIngo Schwarze2020-09-096-15/+41
| | | | | | | | one element next-line scope, the MAN_ELINE flag must not yet be cleared if the parent macro is another element macro having next-line scope, or an assertion failure is caused if all this is wrapped in another macro that has block next-line scope, for example .TP. Bug found in an afl run performed by Jan Schreiber <jes at posteo dot de>.
* Do not abuse assert(3) to react to absurd input; the purpose of assert(3)Ingo Schwarze2020-09-091-2/+16
| | | | | | | | only is to catch internal inconsistencies in the program itself. Issue found in an afl run performed by Jan Schreiber <jes at posteo dot de>. Instead, just cut down unreasonably wide spacing requested by the document to a narrower width.
* assertion found in jes@'es afl run: .TS .if n .ceIngo Schwarze2020-09-071-0/+15
|
* After .ti, there are many reasons why the offset may change, so settingIngo Schwarze2020-09-062-7/+16
| | | | | | it back later requires a guard against underflow, or subsequent assertions may fail. Issue found in an afl run performed by Jan Schreiber <jes at posteo dot de>.
* Fix two issues with .po (page offset) formatting:Ingo Schwarze2020-09-034-7/+66
| | | | | | | | | | | | 1. Truncate excessive offsets to a width reasonable in the context of manual pages instead of printing excessively long lines and sometimes causing assertion failures; found in an afl run performed by Jan Schreiber <jes at posteo dot de>. 2. Remember both the requested and the applied page offset; otherwise, subtracting an excessive width, then adding it again, would end up with an incorrectly large offset. While here, simplify the code by reverting the previous offset up front, and also add some comments to make the general ideas easier to understand.
* If .ti had an excessive argument, using it was attempted, in someIngo Schwarze2020-09-034-13/+70
| | | | | | | | cases resulting in an assertion failure. Instead, truncate the temporary indent to a width reasonable in a manual page. I found the issue in an afl run that was performed by Jan Schreiber <jes at posteo dot de>.
* Do not indent by SIZE_MAX/2 when .ce occurs inside explicit no-fill mode.Ingo Schwarze2020-09-023-16/+29
| | | | | | | | While here, drop two unused arguments from the function term_field(); the related work was already done by term_fill() before this commit. I found the bug in an afl run that was performed by Jan Schreiber <jes at posteo dot de>.
* Ignore unreasonably large spacing modifiers in tbl layouts.Ingo Schwarze2020-09-0110-5/+132
| | | | | | Jan Schreiber <jes at posteo dot de> ran afl on mandoc and it turned out mandoc tried to use spacing modifiers so large that they would trigger assertion failures in term_ascii.c, function locale_advance().
* more info from John Gardner about ASCII control chars in roff(7) inputIngo Schwarze2020-09-011-0/+1
|
* Remove a lie reported by Jamie Landeg-Jones <jamie at catflap dot org>:Ingo Schwarze2020-08-271-4/+1
| | | | | The times when -T man may have expanded .so requests are long gone, nor would such a feature be useful. Use soelim(1) if you need that.
* Fix a regression caused by the insertion of two new tokens,Ingo Schwarze2020-08-271-9/+17
| | | | | | which unintentionally made the -O tag= argument mandatory, breaking commands like "man -akO tag Ic=ulimit". Noticed while answering questions from Ian Ropers.
* Make it more explicit that the statement "-O tag does not work with less(1)"Ingo Schwarze2020-08-271-1/+8
| | | | | | only applies to -T html output mode, and why. Of course, -O tag works just fine with less(1) in the -T ascii and -T utf8 output modes. Potential for confusion pointed out by Ian Ropers.
* Avoid artifacts in the most common case of closing conditional blocksIngo Schwarze2020-08-271-1/+3
| | | | | | | | when no arguments follow the closing brace, \}. For example, the line "'br\}" contained in the pod2man(1) preamble would throw a bogus "escaped character not allowed in a name" error. This issue was originally reported by Chris Bennett on ports@, and afresh1@ noticed it came from the pod2man(1) preamble.
* add a forgotten "#if HAVE_PLEDGE";Ingo Schwarze2020-08-071-0/+2
| | | | | patch sent in by <alexander dot gromnitsky at gmail dot com> who found the problem the hard way on Fedora 32
* Put the code handling \} into a new function roff_cond_checkend()Ingo Schwarze2020-08-038-64/+158
| | | | | | | | | | | | | | | | | | | | and call that function not only from both places where copies existed - when processing text lines and when processing request/macro lines in conditional block scope - but also when closing a macro definition request, such that this construction works: .if n \{.de macroname macro content .. \} ignored arguments .macroname This fixes a bug reported by John Gardner <gardnerjohng at gmail dot com>. While here, avoid a confusing decrement of the line scope counter in roffnode_cleanscope() for conditional blocks that do not have line scope in the first place (no functional change for this part). Also improve validation of an internal invariant in roff_cblock() and polish some comments.
* trivial sync with OpenBSDIngo Schwarze2020-07-302-10/+10
| | | | | in parts of these files that are not used by -portable; consequently, no functional change
* trivial adjustment of the desired test resultsIngo Schwarze2020-07-2128-155/+155
| | | | after getting rid of the "copyless" crutch
* adjust test framework to not require a ttyIngo Schwarze2020-07-212-16/+3
|
* undocumented options -O outfilename and -O tagfilenameIngo Schwarze2020-07-215-34/+92
| | | | | to support regression testing without a tty; no user visible change intended
* Switch the default pager from "more -s" to "less".Ingo Schwarze2020-07-206-20/+43
| | | | | | | | | | | | | | | | | | | | | | POSIX explicitly allows using a different default pager if that is documented. Nowadays, the pager provided in most operating systems is less(1). Our man(1) implementation uses less(1) features that traditional more(1) did not provide, in particular tagging. Besides, as noted by deraadt@, the user interface of less(1) is slightly more refined and preferable over the user inferface of more(1). This switch was originally suggested by Ian Ropers. In ./configure, test whether less(1) is available. If not, fall back to more(1). In ./configure.local, support overriding the automatic test by setting BINM_PAGER. As explained by jmc@ and deraadt@, the -s flag was added a very long time ago when an antique version of groff(1) had an annoying bug in terminal output that would randomly display blank lines in the middle of pages. Clearly, -s has no longer been needed for many years, so drop it from the default pager invocation. OK deraadt@ jmc@ martijn@ job@ on the OpenBSD version of this patch.
* Support the "powerpc64" architecture name.Ingo Schwarze2020-06-292-6/+7
| | | | The first file using it in .Dt was just committed by kettenis@.
* Briefly mention groff_mdoc(7) below SEE ALSO. While both authoritativeIngo Schwarze2020-06-251-3/+9
| | | | | | | manual pages document the same content, comparing can occasionally help in cases of doubt, and some people may prefer one style, some the other. While here, modernize a few .Lks from http:// to https://. OK jmc@
* more details about ASCII control charactersIngo Schwarze2020-06-241-0/+4
|
* Provide a real feature test for __attribute__().Ingo Schwarze2020-06-224-5/+54
| | | | | Looking at version numbers like __GNUC__ is always a bad idea. Believe it or not, this even makes ./configure shorter by one line.
* Because mandoc_aux.h and mandoc.h use __attribute__, all files thatIngo Schwarze2020-06-2211-19/+39
| | | | | | | | include mandoc_aux.h or mandoc.h need to include config.h, too. It is suspected that for example IRIX needs this, or it is likely to throw errors in these files because the system compiler doesn't understand __attribute__. Issue reported by Kazuo Kuroi <kazuo at irixnet dot org>.
* John Gardner: handling of ASCII control characters during inputIngo Schwarze2020-06-221-0/+14
|
* Manually tag the section option.Ingo Schwarze2020-06-171-0/+1
| | | | | Automatic tagging does not work because the [-s] flag is optional. Patch from Martin Vahlensieck.
* Sync stringlist implementation with NetBSD.Ingo Schwarze2020-06-152-45/+73
| | | | Various improvements of security, functionality, and style.
* sync with OpenBSD, no functional change intendedIngo Schwarze2020-06-152-43/+42
|
* update millert@'s email addressIngo Schwarze2020-06-151-3/+4
|