aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* warning about unknown .Lb arguments; inspired by mdoclint(1)Ingo Schwarze2017-06-085-5/+18
|
* style checks related to .Er; inspired by mdoclint(1)Ingo Schwarze2017-06-075-8/+83
|
* Also catch "new sentence, new line" if there are three blanksIngo Schwarze2017-06-071-7/+13
| | | | | between the sentences. Thomas Klausner says he has seen some of these, and i don't see any false positives.
* Make "new sentence, new line" detection stricter:Ingo Schwarze2017-06-071-2/+2
| | | | | | | | | Also catch cases where the new sentence starts with a one-letter word and the input line is broken right after that word. Suggested by Thomas Klausner <wiz @ NetBSD>. It's merely a three-bit diff, changing one byte from 0x34 to 0x33, so what can possibly go wrong...
* Prepare the terminal driver for filling multiple columns in parallel,Ingo Schwarze2017-06-072-27/+44
| | | | | | | | | | second step: make the per-column byte pointer persistent across term_flushln() calls, such that a subsequent call can continue at the point where the previous call left. If more than one column is in use, return from term_flushln() when the column is full, rather than breaking the output line. No functional change, because nothing sets up multiple columns yet.
* Prepare the terminal driver for filling multiple columns in parallel,Ingo Schwarze2017-06-078-244/+261
| | | | | | first step: split column data out of the terminal state struct into a new column state struct and use an array of such column state structs. No functional change.
* The \h escape sequence provides another method for moving backwards,Ingo Schwarze2017-06-072-17/+31
| | | | | | and after that, previously written output gets overwritten, but overwriting with blanks does *not* erase previously written content. Yes, manual pages exist that are crazy enough to rely on that...
* Implement the roff(7) .rn (rename macro or string) request.Ingo Schwarze2017-06-073-11/+113
| | | | | | | | | | Renaming a user-defined macro is very simple: just copy the definition to the new name and delete the old name. Renaming high-level macros is a bit tricky: use a dedicated key-value-table, with non-standard names as keys and standard names as values. When a macro is found that is not user-defined, look it up in the "renamed" table and translate it back to the standard name before passing it on to the high-level parsers.
* document the new .ce implementationIngo Schwarze2017-06-061-3/+6
|
* Minimal implementation of the roff(7) .ce request (center a numberIngo Schwarze2017-06-069-21/+142
| | | | | of input lines without filling). Contrary to groff, high-level macros abort .ce mode for now.
* Implement the roff(7) .mc (right margin character) request.Ingo Schwarze2017-06-0412-110/+128
| | | | | | The Tcl/Tk manual pages use this extensively. Delete the TERM_MAXMARGIN hack, it breaks .mc inside .nf; instead, implement a proper TERMP_BRNEVER flag.
* Make term_flushln() simpler and more robust:Ingo Schwarze2017-06-044-109/+42
| | | | | | Eliminate the "overstep" state variable. The information is already contained in "viscol". Minus 60 lines of code, no functional change intended.
* Pure preprocessor implementation of the roff(7) .ec and .eo requestsIngo Schwarze2017-06-043-89/+111
| | | | | | | | | | | | | | | | | (escape character control), touching nothing after the preprocessing stage and keeping even the state variable local to the preprocessor. Since the escape character is also used for line continuation, this requires pulling the implementation of line continuation from the input reader to the preprocessor, which also considerably shortens the code required for that. When the escape character is changed, simply let the preprocessor replace bare by escaped backslashes and instances of the non-standard escape character with bare backslashes - that's all we need. Oh, and if anybody dares to use these requests in OpenBSD manuals, sending a medium-sized pack of axe-murderers after them might be a worthwhile part of the punishment, but probably insuffient on its own.
* ignore blank lines in man(7) next line scope;Ingo Schwarze2017-06-0319-10/+66
| | | | strange groff edge case behaviour found in multimedia/mjpegtools
* enable -Wstyle by default in -Tlint; OK jmc@Ingo Schwarze2017-06-032-6/+6
|
* Partial implementation of \h (horizontal line drawing function).Ingo Schwarze2017-06-024-11/+80
| | | | | | | | | | | A full implementation would require access to output device properties and state variables (both only available after the main parser has finalized the parse tree) before numerical expansions in the roff preprocessor (i.e., before the main parser is even started). Not trying to pull that stunt right now because the static-width implementation committed here is sufficient for tcl-style manual pages and already more complicated than i would have suspected.
* add about 15 missing character escape sequences found in groff_char(7);Ingo Schwarze2017-06-0215-36/+115
| | | | triggered by multimedia/mkvtoolnix mkvmerge(1) using \(S2
* Minimal implementation of the \h (horizontal motion) escape sequence.Ingo Schwarze2017-06-016-13/+38
| | | | Good enough to cope with the average DocBook insanity.
* STYLE message about full stop at the end of .Nd; inspired by mdoclint(1)Ingo Schwarze2017-06-014-5/+18
|
* STYLE message about missing use of Ox/Nx/Fx/Dx; OK jmc@ wiz@Ingo Schwarze2017-05-314-5/+49
|
* tweak previous; from jmc@Ingo Schwarze2017-05-301-3/+3
|
* STYLE message about useless macros we don't want (Bt Tn Ud);Ingo Schwarze2017-05-307-9/+45
| | | | not a WARNING because they don't endanger portability
* fix formatting of intermediate punctuation in .LkIngo Schwarze2017-05-305-32/+60
|
* Macro argument quoting does not prevent recognition of punctuationIngo Schwarze2017-05-30118-163/+614
| | | | | | | | | | | and of called macros. This bug affects almost all macros, and fixing it simplifies the code. It is amazing that the bogus ARGS_QWORD feature got implemented in the first place, and then carrier along for more than eight years without anybody ever noticing that it was pointless. Reported by Leah Neukirchen <leah at vuxu dot org>, found on Void Linux.
* Use [ rather than [[ for portability,Ingo Schwarze2017-05-181-1/+1
| | | | | in particular since it makes no difference in the case at hand. Reported by Leah Neukirchen <leah at vuxu dot org> (Void Linux).
* Delete the -T xhtml command line option.Ingo Schwarze2017-05-174-18/+9
| | | | | It has been obsolete for more than two years. Use -T html.
* Fix documentation bug:Ingo Schwarze2017-05-171-3/+3
| | | | | man(1) does not ignore manpath directories lacking mandoc.db(5) files; instead, it uses filename lookup to find manuals in such directories.
* Modernize an example showing antiquated syntax,Ingo Schwarze2017-05-171-3/+2
| | | | and delete an example showing the arcane -W stop option.
* missing space between macro arg and punctuation; from jmc@Ingo Schwarze2017-05-171-3/+3
|
* Never create empty databases.Ingo Schwarze2017-05-172-3/+28
| | | | | | | | | | When pkg_add(1)ing packages installing manual pages into some directory, the database in that directory automatically gets created or updated, no change so far. This patch causes the database file to be automatically unlinked when pkg_delete(1)ing the last package having manual pages in that directory, to leave less cruft behind. Suggested by ajacoutot@.
* Do not warn if a database file does not existIngo Schwarze2017-05-171-1/+2
| | | | | because that is simply equivalent to an empty database. Suggested by ajacoutot@
* Delete pointless width calculation for SYNOPSIS .Nm block heads.Ingo Schwarze2017-05-171-18/+1
| | | | | | Just let HTML <table> do its work of selecting the needed width. <Anton dot Lindqvist at gmail dot com> reported that the manually calculated width was insufficient in some manual pages.
* Introduce a new mandoc(1) message level, -W style, below -W warning.Ingo Schwarze2017-05-165-44/+55
| | | | | | | | | | | | | Switch -W all from meaning -W warning to meaning -W style. The meaning of -T lint does *not* change, it still implies -W warning. No messages on the new level yet, but they will come. Usually, i do not lightly make the user interface larger. But this has been planned for years, and EXIT STATUS 1 was reserved for it all the time. The message system is now stable enough to finally implement it. jmc@ regarding the concept: "really good idea"
* warn about punctuation between .Xr and .Rs in SEE ALSO;Ingo Schwarze2017-05-141-2/+2
| | | | inspired by mdoclint
* Tweak previous: tb@ noticed that some browser/font combinationsIngo Schwarze2017-05-141-2/+2
| | | | | | have so amazingly wide bold fonts (for the same nominal font size) that adding 15% to the column width still isn't sufficient to make text reliably fit, so go for 20%.
* Make the tag column in .Bl -tag lists wider:Ingo Schwarze2017-05-123-17/+31
| | | | | | 1. I forgot about the 2n padding between tag and body. 2. The factor 1.1 was too small for bold fold, make it *1.15 + 1n. Ugliness spotted by tb@.
* Trailing \c suppresses the output line break even ifIngo Schwarze2017-05-094-11/+14
| | | | | the next line is a text line starting with whitespace. Quirk found in the sysutils/rancid port.
* Line-breaking roff(7) requests also break man(7) next-line scope.Ingo Schwarze2017-05-082-9/+14
| | | | | | Considering that real roff implements next-line scope using input line traps, that isn't all that surprising. Issue found in the games/xbattle port.
* Basic implementation of the roff(7) .ti (temporary indent) request.Ingo Schwarze2017-05-0816-22/+166
| | | | Needed by about four dozen ports (thanks to naddy@ for the research).
* Convert REQUEST REFERENCE from using .Ss to .Bl -tag, allowing toIngo Schwarze2017-05-081-430/+415
| | | | | specify request arguments and supporting tag searching in less(1). Improve some entries and document .ta.
* implement .DT in terms of .ta; needed for print/ghostview, for exampleIngo Schwarze2017-05-072-6/+20
|
* Basic implementation of the roff(7) .ta (define tab stops) request.Ingo Schwarze2017-05-0720-40/+335
| | | | | | This is the first feature made possible by the parser reorganization. Improves the formatting of the SYNOPSIS in many Xenocara GL manuals. Also important for ports, as reported by many, including naddy@.
* Shorten the description of .sp and move it to roff(7).Ingo Schwarze2017-05-053-46/+14
| | | | | If is not a macro but a low-level roff request and not recommended for use in manual pages.
* Move .sp to the roff modules. Enough infrastructure is in placeIngo Schwarze2017-05-0523-192/+111
| | | | now that this actually saves code: -70 LOC.
* move .ll to the roff modulesIngo Schwarze2017-05-0517-90/+59
|
* Clean up docs after today's .br and .ft code cleanup; simpler.Ingo Schwarze2017-05-053-33/+11
|
* Move handling of the roff(7) .ft request from the man(7)Ingo Schwarze2017-05-0521-110/+235
| | | | | modules to the new roff(7) modules. As a side effect, mdoc(7) now handles .ft, too. Of course, do not use that.
* Start roff formatter modules for HTML and termininal output,Ingo Schwarze2017-05-0410-62/+152
| | | | | | | used by both the mdoc and man formatters, with the ultimate goal of reducing code duplication between the two macro formatters. Made possible by the parser unification. Add the first formatting function (for the .br request).
* Parser reorg:Ingo Schwarze2017-05-0428-92/+182
| | | | | Generate the first node on the roff level: .br Fix some column numbers in diagnostic messages while here.
* A few days ago, a patch from <G dot Branden dot Robinson at gmail dot com>Ingo Schwarze2017-05-011-2/+16
| | | | | | | | | got committed to groff which changed .TP from using .it to using .itc, such that groff now supports more than one man(7) macro line in the .TP head if all but the last line in the head end with \c. Of course, relying on that behaviour is utterly non-portable, but if authors are reckless enough to use that idiom, let's do what they want.