aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* release 1.14.5VERSION_1_14_5Ingo Schwarze2019-03-101-5/+10
|
* Automatically detect whether diff(1) supports the -a option.Ingo Schwarze2019-03-101-1/+2
| | | | | Useful on illumos and on Oracle Solaris, where it doesn't. Patch written based on a report from Sevan Janiyan.
* Mention mandoc.db(5), makewhatis(8), and weekly(8).Ingo Schwarze2019-03-091-2/+14
| | | | Omission noticed by espie@ long ago, and wording tweaked by jmc@.
* new dist-install maintainer targetIngo Schwarze2019-03-061-1/+5
|
* while $() is more modern than ``, it does not work with theIngo Schwarze2019-03-061-2/+2
| | | | default /bin/sh on Solaris 10, so use the classical form
* mention Solaris BUGS in regress.pl(1)Ingo Schwarze2019-03-062-5/+24
|
* this file needs to #include "config.h" because it calls getprogname();Ingo Schwarze2019-03-061-1/+3
| | | | found while testing on Debian jessie
* drop redundant '0' flag from "%02.2X" format string;Ingo Schwarze2019-03-061-2/+2
| | | | found by a compiler warning from gcc 4.9.2 on Linux
* work towards 1.14.5, mostly updating WWW_INCSIngo Schwarze2019-03-061-7/+10
|
* add arch.oIngo Schwarze2019-03-061-0/+1
|
* draft 1.14.5 NEWS entryIngo Schwarze2019-03-061-1/+70
|
* autoconfiguration test whether less(1) supports the -T option;Ingo Schwarze2019-03-063-3/+24
| | | | | needed for Alpine Linux because it uses busybox less(1) by default; based on a patch from Daniel Sabogal explained to me by Natanael Copa
* For TIOCGWINSZ, #include <termios.h> rather than <sys/termios.h>Ingo Schwarze2019-03-041-2/+2
| | | | | | like almost all other userland programs. This also improves portability: for example, it looks like <sys/termios.h> does not work on FreeBSD, or at least bapt@ did the same change over there.
* add libbe; from kevans@ via FreeBSD rev. 337663Ingo Schwarze2019-03-041-1/+2
|
* When the -S option is given to man(1) and the requested manual pageIngo Schwarze2019-03-048-62/+121
| | | | | | | | | | | | name is not found and the requested architecture is unknown, complain about the architecture rather than about the manual page name: $ man -S vax cpu man: Unknown architecture "vax". $ man -S sparc64 foobar man: No entry for foobar in the manual. Friendlier error message suggested by jmc@, who also OK'ed the patch.
* Fix the last straggler where the struct roff_node "line" memberIngo Schwarze2019-03-042-7/+3
| | | | | was abused to detect an input line break; instead, use the NODE_LINE flag to improve robustness.
* additional comments on two TODO itemsIngo Schwarze2019-03-041-4/+12
|
* Reset HTML formatter state, in particular the id_unique hash,Ingo Schwarze2019-03-034-12/+28
| | | | | | | | after processing each manual page, such that the next page starts from a clean state and doesn't continue suffix numbering. Issue found while looking at https://github.com/Debian/debiman/issues/48 which was brought up by Orestis Ioannou <oorestisime at github>.
* add forgotten mparse options to two rarely used programsIngo Schwarze2019-03-032-5/+6
|
* Do not open a subsection for each and every macro.Ingo Schwarze2019-03-021-178/+165
| | | | | | Instead, use a tagged list and the canonical .Ic macro as it is natural for such purposes. While here, also delete heaps of needless escaping.
* remove a few words to improve flow; from tedu@Ingo Schwarze2019-03-021-4/+4
|
* Represent multiple subsequent .IP blocks having a consistentIngo Schwarze2019-03-022-22/+69
| | | | | | | | | head argument of *, \-, or \(bu as <ul> rather than as <dl>, using a bit of heuristics. Basic idea suggested by Dagfinn Ilmari Mannsaker <ilmari at github> in https://github.com/Debian/debiman/issues/67 and independently by <Pali dot Rohar at gmail dot com> on <discuss at mandoc dot bsd dot lv>.
* Wrap .Sh/.SH sections and .Ss/.SS subsections in HTML <section> elementsIngo Schwarze2019-03-0112-29/+53
| | | | | | as recommended for accessibility by the HTML 5 standard. Triggered by a similar, but slightly different suggestion from Laura Morales <lauretas at mail dot com>.
* Format multiple subsequent .IP or multiple subsequent .TP/.TQIngo Schwarze2019-02-282-9/+30
| | | | | as a single <dl> list rather than opening a new list for each item; feature suggested by Pali dot Rohar at gmail dot com.
* Explain the ASCII rendering of single quotes because that repeatedlyIngo Schwarze2019-02-231-2/+13
| | | | | | | | | | | caused confusion in the past. People plainly do not expect that there are limits to the compatibility between Unicode and ASCII, but there are. The information belongs here and not into mandoc_char(7) because it explains how the specific output device (-T ascii) works and because it has nothing to do with the question of how characters are represented on the input side.
* The horizontal line in a data cell containing only "_" or "="Ingo Schwarze2019-02-091-48/+45
| | | | | connects to the horizontally adjacent vertical line or cell; fixing a bug reported by bentley@.
* add a BUGS section explaining the situation with box and line drawingIngo Schwarze2019-02-091-3/+17
| | | | in UTF-8 output; suggested by bentley@
* ignore empty request lines in the table data reader;Ingo Schwarze2019-02-091-10/+23
| | | | fixing a minibug reported by bentley@
* fix typo: "a data cells" -> "a data cell"; from bentley@Ingo Schwarze2019-02-081-3/+3
|
* style improvement from jmc@, no output change;Ingo Schwarze2019-02-071-6/+4
| | | | | | | | | | original commit message: .Pp .Bd ... -compact is better written as .Bd ...
* Remove the misleading statement ".No takes no arguments".Ingo Schwarze2019-02-061-4/+4
| | | | | In facts, i works very similarly to .Em and .Sy. Triggered by a question from Kurt Mosiejczuk <kurt at cranky dot work>.
* Let roff_getname() end the roff identifier at a tab characterIngo Schwarze2019-02-0618-23/+218
| | | | | | | | | | | | | | | | | | | | | | and audit all its callers whether termination is handled correctly. Resulting improvements: * An escape or tab ending the macro name in a macro invocation is discarded, and argument processing is started after it. * An escape or tab ending a name in ".if d" and ".if r" is preserved. * An escape ending a name in ".ds" causes the whole request to be ignored. * A tab ending a name in ".ds" becomes part of the string. * An escape or tab ending a name in ".rm" causes the rest of the line to be ignored. * An escape or tab ending the first name in ".als", ".rn", or ".nr" causes the whole request to be ignored. Kurt Jaeger <pi at FreeBSD> made me aware of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235456#c0 and in that bug report, comment 0 item (3) is a special case of this class of issues. Yes, the "mh" manual pages are no doubt among the worst on the planet.
* adjust style and comments in roff_getname(); no functional changeIngo Schwarze2019-02-061-12/+15
|
* Relax overzealous PATH_INFO validation.Ingo Schwarze2019-01-311-2/+2
| | | | | | | URIs like https://man.openbsd.org/OpenBSD-2.2/cat1/cat.0 are still required to work because they result from apropos searches for old releases (up to 5.0) which used to install preformatted manual pages. Regression reported by jj@.
* Since resetting of offsets works quite differently in man(7) and mdoc(7),Ingo Schwarze2019-01-313-2/+29
| | | | | test table centering in an mdoc(7) document as well. Related to tbl_term.c rev. 1.67.
* Fix tbl(7) centering in mdoc(7) documents.Ingo Schwarze2019-01-311-4/+8
| | | | | | | | | | Since resetting of offsets works quite differently in the mdoc(7) and man(7) formatters, the tbl(7) formatter needs to save the global offset on entry and restore it on exit. The additional indentation needed for table centering has to be added to its own offset variable and applied to each line of the table, rather than only to the first. Bug found by bentley@ in emulators/fceux(6).
* The .UR and .MT blocks in man(7) are represented by <a> elementsIngo Schwarze2019-01-184-59/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which establish phrasing context, but they can contain paragraph breaks (which is relevant for terminal formatting, so we can't just change the structure of the syntax tree), which are respresented by <p> elements and cannot occur inside <a>. Fix this by prematurely closing the <a> element in the HTML formatter. This menas that the clickable text in HTML output is shorter than what is represented as the link text in terminal output, but in HTML, it is frankly impossible to have the clickable area of a hyperlink extend across a paragraph break. The difference in presentation is not a major problem, and besides, paragraph breaks inside .UR are rather poor style in the first place. The implementation is quite tricky. Naively closing out the <a> prematurely would result in accessing a stale pointer when later reaching the physical end of the .UR block. So this commit separates visual and structural closing of "struct tag" stack items. Visual closing means that the HTML element is closed but the "struct tag" remains on the stack, to avoid later access to a stale pointer and to avoid closing the same HTML element a second time later. This also needs reference counting of pointers to "struct tag" stack items because often more than one child holds a pointer to the same parent item, and only the outermost child can safely do the physical closing. In the whole corpus of nearly half a million manual pages on man.openbsd.org, this problem occurs in exactly one page: the groff(1) version 1.20.1 manual contained in DragonFly-3.8.2, which contains a formatting error triggering the bug.
* Delete several entries that were already fixed.Ingo Schwarze2019-01-171-29/+2
| | | | | The two entries about dashes, hyphens, and minus signs are no longer relevant because we decided on a policy that is now documented.
* Test handling of escaped backslashes because the code related toIngo Schwarze2019-01-175-2/+97
| | | | copy mode is complicated and prone to regressions.
* In PostScript and PDF output, one AFM unit is not nearly enoughIngo Schwarze2019-01-151-3/+4
| | | | | | inter-word spacing, let's try again with 250 AFM units. Regression caused during my recent term_flushln() reorg in rev. 1.278, reported by brynet@ (sorry and many thanks for reporting).
* Improve error reporting when a file given on the command lineIngo Schwarze2019-01-112-5/+7
| | | | | | cannot be opened: * Mention the filename. * Report the errno for the file itself, not the one with .gz appended.
* do not access a NULL pointer when formatting a completely empty documentIngo Schwarze2019-01-112-5/+5
|
* Remove the HTML title= attributes which harmed accessibility andIngo Schwarze2019-01-1111-84/+146
| | | | | | | violated the principle of separation of content and presentation. Instead, implement the tooltips purely in CSS. Thanks to John Gardner <gardnerjohng at gmail dot com> for suggesting most of the styling in the new ::before rules.
* After years of gnashing of teeth, i finally found a way to avoidIngo Schwarze2019-01-102-15/+8
| | | | | | | | | | | | | | | | | | having to write empty list elements for non-compact .Bl -tag lists: 1. Add margin-bottom to the <dd>. Note that margin-top on the <dt> doesn't work because it would put a short <dt> lower than the <dd>; margin-bottom on the <dt> doesn't work because it would put vertical space before the <dd> for a long <dt>; and margin-top on the <dd> doesn't work because it would put a short <dt> higher than the <dd>. Only margin-bottom on the <dd> has none of these adverse effects. 2. Of course, margin-bottom on the <dd> fails to take care of the vertical spacing before the first list element, so implement that separately by margin-top on the <dl>. 3. For .Bl -tag -compact, reset both to zero.
* Initializers for file-scope static variables should be compile-timeIngo Schwarze2019-01-102-4/+5
| | | | | | | | constants, and while stderr is a compile-time constant in OpenBSD, Kelvin Sherlock <ksherlock at gmail dot com> reports that it isn't on some other systems, for example on FreeBSD or Linux. So do the initialization by calling mandoc_msg_setoutfile() from main() instead.
* Represent mdoc(7) .Pp (and .sp, and some SYNOPSIS and .Rs features)Ingo Schwarze2019-01-0741-190/+627
| | | | | | | | | | | | | | | | | | | by the <p> HTML element and use the html_fillmode() mechanism for .Bd -unfilled, just like it was done for man(7) earlier, finally getting rid both of the horrible <div class="Pp"></div> hack and of the worst HTML syntax violations caused by nested displays. Care is needed because in some situations, paragraphs have to remain open across several subsequent macros, whereas in other situations, they must get closed together with a block containing them. Some implementation details include: * Always close paragraphs before emitting HTML flow content. * Let html_close_paragraph() also close <pre> for extra safety. * Drop the old, now unused function print_paragraph(). * Minor adjustments in the top-level man(7) node formatter for symmetry. * Bugfix: .Ss heads suspend no-fill mode, even though .Ss doesn't end it. * Bugfix: give up on .Op semantic markup for now, see the comment.
* Finally, represent the man(7) .PP and .HP macros by the naturalIngo Schwarze2019-01-0633-122/+466
| | | | | | | | | | | choice, which is the <p> HTML element. On top of the previous fill-mode improvements, the key to making this possible is to automatically close the <p> when required: before headers, subsequent paragraphs, lists, indented blocks, synopsis blocks, tbl(7) blocks, and before blocks using no-fill mode. In man(7) documents, represent the .sp request by a blank line in no-fill mode and in the same way as .PP in fill mode.
* In no-fill mode, avoid bogus blank lines in two situations:Ingo Schwarze2019-01-053-4/+36
| | | | | 1. After the last child; the parent will take care of the line break. 2. At the .YS macro; the end of the preceding .SY already broke the line.
* In groff, when the .SY block macro occurs in no-fill mode,Ingo Schwarze2019-01-055-4/+70
| | | | the output line gets broken after the head. Do the same.
* Slowly start doing more HTML output tests, in this case for theIngo Schwarze2019-01-054-12/+44
| | | | | | | | | | | | | | | | | | | interaction of .nf and .RS, related to man_macro.c rev. 1.106. HTML regression testing is tricky because it is extremely prone to over-testing, i.e. unintentional testing for volatile formatting details which are irrelevant for deciding whether the HTML output is good or bad. Minor changes to the formatter - which is still heavily under development - might result in the necessity to repeatedly adjust many test cases. Then again, HTML syntax rules are so complicated that without regression testing, the risk is simply too high that later changes will re-introduce issues that were already fixed earlier. Let's just try to design the tests very carefully in such a way that the *.out_html files contain nothing that is likely to change, and defer testing in cases where the HTML output is not yet clean enough to allow designing tests in such a way.