summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* add a style message about overlong text lines,Ingo Schwarze2021-06-276-3/+19
| | | | | | | | trying very hard to avoid false positives, not at all trying to catch as many cases as possible; feature originally suggested by tb@, OK tb@ kn@ jmc@
* new TODO entry: HTML formatting of .nfIngo Schwarze2021-06-271-0/+5
|
* three new TODO itemsIngo Schwarze2021-06-261-0/+19
|
* In -W style mode, check .Xr links along the full manpath becauseIngo Schwarze2021-06-024-30/+54
| | | | | | | | | | | that is more useful for validating manuals of non-base software. Nothing changes in -W all mode: by default for -T lint, we still assume we want to check base system conventions, including usually not wanting to link to non-base manual pages. The use case, a partial idea how to handle it, and a preliminary patch was originally presented by kn@, then refined by me. Final patch tested and OK'ed by kn@.
* tbl(7) layout "n" specifier for HTML outputIngo Schwarze2021-06-021-0/+6
|
* In revision 1.157 of cgi.c, a meta viewport element was added toIngo Schwarze2021-06-021-0/+2
| | | | | | the HTML output. Let `mandoc -Thtml' behave the same, making the generated HTML a bit more pleasant to view on a mobile device. Patch from anton@.
* test private use areas some more as they have proven fragileIngo Schwarze2021-06-028-38/+74
|
* Cleanup:Ingo Schwarze2021-06-024-53/+57
| | | | | | | | | | 1. Move invalid two-byte sequences after valid ones and make their descriptions easier to understand. 2. Replace the wrong and confusing expression "middle byte" with the correct term "start byte". 3. Add test lines for U+EFFFF and U+F0000. 4. Replace the unhelpful word "strange" with more descriptive terms. Arguably, nothing about this (or maybe everything?) is strange.
* The wcwidth(3) of Plane 15 and Plane 16 Private Use CharactersIngo Schwarze2021-06-022-4/+4
| | | | | was changed from 0 to 1. Adjust the test results accordingly. Issue reported by bluhm@
* When looking for column separators on tbl(7) data lines, properly skipIngo Schwarze2021-05-181-3/+7
| | | | | | escape sequences; do not misinterpret bytes from the middle of escape sequence names or arguments as column separators. Bug reported and patch tested by Oliver dot Corff at email dot de.
* Implement the layout specification "a" (left justify with 1em indentation)Ingo Schwarze2021-05-161-0/+2
| | | | | | in HTML output mode; before this patch, the indentation was missing. Terminal output already supported the "a" specifier since 2010. Issue reported and patch tested by Oliver dot Corff at email dot de.
* test font modifiers in the layout; related to tbl_html.c rev. 1.34Ingo Schwarze2021-05-164-2/+49
|
* implement the tbl(7) layout modifiers "b" (bold) and "i" (italic)Ingo Schwarze2021-05-162-2/+11
| | | | | in HTML output mode, similar to tbl_term.c, function tbl_word(); issue reported by Oliver dot Corff at email dot de
* When looking for the last layout row used, we need to look at the layoutIngo Schwarze2021-05-151-4/+5
| | | | | | | | | | | | | | row used for the previous data line containing data, not at the previous data line outright, which might be a horizontal ruler. If it is, do not restart from the first layout row but still proceed to the next data row, which may have been just read from T&. Bug originally reported by Oliver dot Corff at email dot de on groff at gnu dot org: https://lists.gnu.org/archive/html/groff/2021-03/msg00003.html and forwarded to me by bentley@. Patch OK'ed by bentley@ back in April.
* Add OpenBSD riscv64 architecture; patch from jsg@.Ingo Schwarze2021-05-132-3/+4
| | | | While here, retire sgi and socppc.
* remove stray byte from broken escape sequence; diff from jmc@Ingo Schwarze2021-05-121-1/+1
|
* 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