aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* \f[] means \fP, not \fRIngo Schwarze2018-08-201-5/+8
|
* Expand \n(.$ (the number of macro arguments) right in roff_userdef(),Ingo Schwarze2018-08-201-8/+35
| | | | | | | | before even reparsing the expanded macro. That is the least dirty way to fix the bug that \(.$ remained set after execution of the user-defined macro ended. Any other way to fix it would probably require changes to read.c, which really shouldn't be bothered with such roff(7) internals.
* Disable one test for now that is broken after the addition of \).Ingo Schwarze2018-08-192-4/+3
| | | | | | | | It is not broken because of \), which is correctly implemented, but the addition merely reveals a hidden bug elsewhere, almost certainly in \\ handling. Given that \\ is among the most mysterious escape sequences and using it is very strongly discouraged in manual pages, fixing that is not urgent - and may be hard.
* Add the \) special character, a variant of \& so arcane that iIngo Schwarze2018-08-191-1/+2
| | | | | intentionally leave it undocumented. Abused for example in the groff(7) manual page.
* Do alignment of non-numeric strings in numeric cells the same wayIngo Schwarze2018-08-192-60/+103
| | | | | | as groff, and also honour the explicit alignment indicator "\&". This required an almost complete rewrite of both the measurement function and the formatter function for numeric cells.
* do not print horizontal lines inside vertical spansIngo Schwarze2018-08-191-7/+21
|
* Mostly complete implementation of the 'c' (character available)Ingo Schwarze2018-08-193-18/+64
| | | | | | | | | | | roff conditional, except that the .char request still isn't supported and that behaviour differs from groff in many edge cases. But at least valid character names and numbers are now distinguished from invalid ones. This also fixes the bug that parsing of the 'c' conditional was incomplete, which resulted in leaking the tested character to the input parser at the beginning of the body when the condition was inverted.
* Bugfix: When a line ends with '\ \"', don't strip the trailing spaceIngo Schwarze2018-08-181-2/+3
| | | | because that turned it into a bogus line continuation.
* support the highly surprising escape sequence \# (line continuationIngo Schwarze2018-08-182-4/+17
| | | | with comment); used for example by gropdf(1)
* paragraphs can contain .MT and .UR blocksIngo Schwarze2018-08-181-2/+3
|
* If a tbl(7) column contains both text cells and numeric cells,Ingo Schwarze2018-08-182-6/+12
| | | | horizontally align the numbers in the same way as groff does.
* .RE causes a line break even if .RS is not openIngo Schwarze2018-08-181-1/+7
|
* .SY causes a one-column indentation even without any argumentIngo Schwarze2018-08-181-2/+2
|
* Do not allocate a column for decimal points if all numbers are integers.Ingo Schwarze2018-08-182-14/+10
|
* Unsurprisingly, zero-width non-breaking spaces have... width 0.Ingo Schwarze2018-08-181-3/+2
|
* end of sentence detection after .ME and .UE, useful for some GNU manualsIngo Schwarze2018-08-181-1/+3
|
* The .nf/.fi (fill mode) requests never have text childrenIngo Schwarze2018-08-181-3/+3
| | | | and in particular do not reset font mode.
* Two consecutive .SY blocks only get a blank line in betweenIngo Schwarze2018-08-182-4/+12
| | | | if the first one is explicitly closed with .YS.
* prevent line breaks in the middle of .OPIngo Schwarze2018-08-181-2/+3
|
* Massively reduce the amount of text, cutting it down to what is neededIngo Schwarze2018-08-181-370/+73
| | | | | | | | | | | to understand existing man(7) code and deleting parts that would only be useful for writing new documents, which we strongly discourage: * Delete the MANUAL STRUCTURE section which merely duplicates mdoc(7). * Delete internal cross references only useful for writing new code. * Delete many instances of "included only for compatibility" as the whole language is only provided for compatibility. * Fix a few minor errors and omissions.
* implement the GNU man-ext .SY/.YS (synopsis block) macro in man(7),Ingo Schwarze2018-08-189-15/+124
| | | | used in most manual pages of the groff package
* Remove more pointer arithmetic passing via regions outside the arrayIngo Schwarze2018-08-1716-151/+177
| | | | | that is undefined according to the C standard. Robert Elz <kre at munnari dot oz dot au> pointed out i wasn't quite done yet.
* implement the GNU man-ext .TQ macro in man(7),Ingo Schwarze2018-08-168-25/+35
| | | | used for example by groff_diff(7)
* Do not calculate a pointer to a memory location before the beginning ofIngo Schwarze2018-08-162-7/+5
| | | | | | a static array. Christos Zoulas, Robert Elz, and Andreas Gustafsson point out that is undefined behaviour by the C standard even if we never access the pointer.
* Document \*(.T.Ingo Schwarze2018-08-161-41/+24
| | | | | | | | While here, delete the section about predefined strings. For manual pages, the concept is not important enough to be discussed in such a prominent place, and some aspects of the text were also misleading. Add a shorter version of the relevant parts to the description of the \* escape sequence instead.
* Implement the \*(.T predefined string (interpolate device name)Ingo Schwarze2018-08-1613-17/+151
| | | | | by allowing the preprocessor to pass it through to the formatters. Used for example by the groff_char(7) manual page.
* process UTF-8 input even in ASCII output mode,Ingo Schwarze2018-08-161-2/+2
| | | | and provide a way to specify additional diff(1) options
* fix incomplete variable renaming in previous;Ingo Schwarze2018-08-151-2/+2
| | | | found by Thomas Klausner <wiz at NetBSD> via a compiler warning
* Change comment: NetBSD just fixed their headers; but leave theIngo Schwarze2018-08-151-2/+2
| | | | | workaround in place for now for the benefit of older systems, and other systems might contain similar problems.
* NULL requires <stddef.h>Ingo Schwarze2018-08-151-1/+2
|
* Autodetect whether _GNU_SOURCE or _OPENBSD_SOURCE are needed; theIngo Schwarze2018-08-156-65/+70
| | | | | latter is a NetBSD idiosyncrasy reported by wiz@. Also take into account that NetBSD declares getsubopt(3) in the wrong header.
* support tail arguments on the .ME and .UE macros,Ingo Schwarze2018-08-1410-39/+64
| | | | used for example in the ditroff(7) manual of the groff package
* error message for invalid -S argumentIngo Schwarze2018-08-101-1/+10
|
* handle the non-portable GNU-style \[charNN], \[charNNN] characterIngo Schwarze2018-08-103-14/+35
| | | | escape sequences, used for example in the groff_char(7) manual page
* The groff man-ext macros define fonts CB, CI, and CR,Ingo Schwarze2018-08-104-15/+19
| | | | | and some groff manual pages actually use them in .ft requests. It's easy enough to handle these .ft requests in mandoc, too.
* Implement the roff(7) .nop (no operation) request.Ingo Schwarze2018-08-103-12/+22
| | | | | Examples of manual pages (ab)using it include groff(7), chem(1), groff_mom(7), and groff_hdtbl(7).
* If somebody asks "man 3 chmod",Ingo Schwarze2018-08-091-3/+9
| | | | | | don't respond with the lie: "No entry for chmod in the manual." Instead, say "No entry for chmod in section 3 of the manual." Came up after a question from kn@; OK kn@.
* some fixes for the "www" and "www-install" maintainer targetsIngo Schwarze2018-08-091-9/+14
|
* release 1.14.4VERSION_1_14_4Ingo Schwarze2018-08-081-6/+8
|
* Even though we strongly discourage escaping hyphens in manual pagesIngo Schwarze2018-08-081-2/+2
| | | | | in general, when introducing the *typographic* term "hyphen", actually display a real hyphen in output modes supporting it.
* Reorder the text in the "Dashes and Hyphens" subsection to keep theIngo Schwarze2018-08-081-25/+25
| | | | | | simplest and most important instructions together and at the beginning. No text change. Suggested by jmc@.
* Clarify the confusing "(text)" annotation in the character lists.Ingo Schwarze2018-08-081-17/+18
| | | | | | | | | | In some cases, it meant "render as an ASCII character in output modes that have a notion of codepoints" (e.g. UTF-8, HTML); in other cases, "render in the text font in output modes that also provide a special font for mathematical symbols" (e.g. PostScript, PDF). Also explicitly annotate the escape sequences that use a special font if available. OK bentley@
* After years of deliberation, finally provide a clear recommendationIngo Schwarze2018-08-081-16/+21
| | | | | | | | for hyphens and minus signs in manual pages. Since there is consensus that a typographically perfect solution is impossible, let's KISS - just write "-", don't bother with "\-", all currently relevant manual page formatters can handle "-" reasonably. OK jmc@ bentley@
* scanned to groff manual pages for todo items;Ingo Schwarze2018-08-061-1/+29
| | | | | the sheer number of issues is amazing, but they all look feasible
* Fix an off-by-one string read access that could happen if an emptyIngo Schwarze2018-08-011-3/+2
| | | | | string argument preceded a string argument beginning with "--". Found by Leah Neukirchen <leah at vuxu dot org> with -Wpointer-compare.
* After rewriting the parse buffer from scratch, we also have to resetIngo Schwarze2018-08-012-3/+8
| | | | | | the parse point to the beginning of the new buffer or we risk out of bounds accesses. Bug found by Leah Neukirchen <leah at vuxu dot org> with valgrind on Void Linux.
* Avoid a read access one byte beyond the end of an allocated stringIngo Schwarze2018-08-012-5/+5
| | | | | which occurred in situations like ".Fl a Cm --"; found by Leah Neukirchen <leah at vuxu dot org> with valgrind on Void Linux.
* more 1.14.4 release preparations:Ingo Schwarze2018-07-316-67/+113
| | | | | | autodetect whether the compiler can use -W and -static, clearer output from ./configure, and adjust some configuration instructions
* makewhatis -p complains about language subdirectoriesIngo Schwarze2018-07-311-1/+5
|
* html.c now uses ohash, and new file compat_strndup.cIngo Schwarze2018-07-311-1/+2
|