aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Enter dangling .so links into the database, to avoid harassingIngo Schwarze2019-05-031-7/+12
| | | | | | | | | users of man(1) about running makewhatis(8), which won't help. Seeing the content of the broken .so request might even help users to figure out how to access the manual page they want. Fixing the last issue reported by Lorenzo Beretta <loreb at github> as part of https://github.com/void-linux/void-packages/issues/9868 .
* In fs_lookup(), use stat(2) rather than access(2) to check file existence.Ingo Schwarze2019-05-032-14/+13
| | | | | | | | | | | Some mildly broken real-world packages on some operating systems contain dangling symlinks in manual page directories: pestering the user to run makewhatis(8) makes no sense because that won't help. On the other hand, missing read permissions deserve ugly error messages and are unlikely to occur in practice anyway. Fixing an issue reported by Lorenzo Beretta <loreb at github> as part of https://github.com/void-linux/void-packages/issues/9868 .
* In man(1) mode with a specific section requested,Ingo Schwarze2019-05-032-19/+18
| | | | | | | | | | | | | | | | try harder to find the best match. Use this order of preference: 1. The section in both the directory name and the file name matches exactly. 2. The section in the file name matches exactly. 3. The section in the directory name matches exactly. 4. Neither of them matches exactly. The latter can happen when mansearch() finds substring matches or when the second .Dt argument mismatches the dir and file names. Lorenzo Beretta <loreb at github> reported that this caused real problems on Void Linux, like "man 3 readline" showing readline(3m). See https://github.com/void-linux/void-packages/issues/9868 for details.
* In man(1) mode, when the first argument starts with a digit,Ingo Schwarze2019-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | optionally followed by a letter, and at least one more argument follows, interpret the first argument as a section name even when additional characters follow after the digit and letter. This is needed because many operating systems have section names consisting of a digit followed by more than one letter - for example Illumos, Solaris, Linux, even NetBSD. There is very little risk of regressions: in the whole corpus of manual pages on man.openbsd.org, there isn't a single manual page name starting with a digit. And even if programs like "0ad" or "4channels" had manual pages, "man 0ad" and "man -a cat 0ad" would still work, only "man -a 0ad cat" will fail with "man: No entry for cat in section 0ad of the manual." Fixing one of the issues reported by Lorenzo Beretta <loreb at github> as part of https://github.com/void-linux/void-packages/issues/9868 .
* In man(1) mode, i.e. when asking for a single manual page by name,Ingo Schwarze2019-04-304-12/+13
| | | | | | | | | | | | prefer file name matches over .Dt/.TH matches over first NAME matches over later NAME matches, but do not change the ordering for apropos(1) nor for man -a. This reverts main.c rev. 1.310 and mansearch.h rev. 1.29 and includes a partial revert of mansearch.c rev. 1.79. Regression reported by Lorenzo Beretta <loreb at github> as part of https://github.com/void-linux/void-packages/issues/9868 .
* In HTML output, allow switching the desired font for subsequentIngo Schwarze2019-04-305-71/+39
| | | | | | | | text without printing an opening tag right away, and use that in the .ft request handler. While here, garbage collect redundant enum htmlfont and reduce code duplication in print_text(). Fixing an assertion failure reported by Michael <Stapelberg at Debian> in pmRegisterDerived(3) from libpcp3-dev.
* improve the description of the message "blank line in fill mode";Ingo Schwarze2019-04-301-3/+6
| | | | triggered by a misunderstanding by sashan@
* clarify the difference between .Cm and .Ic;Ingo Schwarze2019-04-241-10/+12
| | | | triggered by a question from Fabio Scotoni
* clarify how .%P is conventionally used;Ingo Schwarze2019-04-231-3/+10
| | | | triggered by a question from Fabio Scotoni <fabio at esse dot ch>
* add missing "pp." to .%P macro;Ingo Schwarze2019-04-231-3/+3
| | | | reported by Fabio Scotoni <fabio at esse dot ch>
* issues found by Jan Stary in groffer(1) version 1.19Ingo Schwarze2019-04-231-1/+22
|
* When calling an empty macro, do not clobber existing arguments.Ingo Schwarze2019-04-214-5/+37
| | | | | Fixing a bug found with the groffer(1) version 1.19 manual page following a report from Jan Stary.
* Implement the roff .break request (break out of a .while loop).Ingo Schwarze2019-04-215-15/+76
| | | | | | | Jan Stary <hans at stare dot cz> found it in an ancient groffer(1) manual page (version 1.19) on MacOS X Mojave. Having .break not implemented wasn't a particularly bright idea because obviously, it tended to cause infinite loops.
* new man(1) issues from Lorenzo Beretta <loreb at github>Ingo Schwarze2019-04-011-1/+25
|
* While we do encourage simplicity in the sense of writing plain '-'Ingo Schwarze2019-03-311-4/+4
| | | | | | | | for hyphen-minus, soften the language a bit: writing \- for it is not wrong, and people started sending us patches to replace \- with '-' in existing manual pages, which is not a worthwhile change unless the \- is used at a place where it doesn't belong. OK jmc@
* Set the maximum column index in a tbl(7) to the maximum *right* edgeIngo Schwarze2019-03-291-2/+2
| | | | | | | | | | | | | | | of any cell span, not to the maximum *left* edge, which may be smaller if the last column of the table is only reached by horizontal spans, but not by any regular cell in any row of the table. Otherwise, the algorithm calculating column widths accessed memomy after the end of the colwidth[] array, while it was trying to handle the rightmost column(s). Crash reported by Jason Thorpe <thorpej at NetBSD> via https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54069 and via Thomas Klausner (wiz@). Christos@ Zoulas sent a (correct, but slightly confusing) patch. The patch i'm committing here is easier to understand.
* When the last line of the input is empty and the previous line reducedIngo Schwarze2019-03-191-1/+3
| | | | | | | the line input buffer to a length of one byte, do not write one byte past the end of the line input buffer. Minimal code to show the bug: printf ".ds X\n.X\n\n" | MALLOC_OPTIONS=C mandoc Bug found by bentley@ in the sysutils/rancid par(1) manual page.
* fix a NULL pointer access on empty tbl(7) data cellsIngo Schwarze2019-03-181-3/+5
| | | | that bentley@ found in syncthing-bep(7)
* The header file "html.h" uses enum roff_tok,Ingo Schwarze2019-03-174-46/+67
| | | | | | so "roff.h" must be included before it. Diff from bcallah@ tweaked by me; he found the bug by compiling with pcc.
* When drawing a horizontal line in tbl(7) UTF-8 output, it is notIngo Schwarze2019-03-161-13/+18
| | | | | | | | | | | | | sufficient to look at two data rows, but up to three are needed: the one above to identify vertical lines branching off upward, the row itself (in case the line is in a data row rather than a layout line) to figure out the horizontal line style, and the row below to identify vertical lines branching off downward. As an example, bentley@ reported from the mpv(1) manual page that in a tbl(7) having a vertical line in the middle and a horizontal line in the bottom data row, the vertical line extended below the bottom horizontal line.
* Contrary to what the NetBSD attribute(3) manual page suggests,Ingo Schwarze2019-03-132-6/+6
| | | | | | | | | | | | | using __dead instead of __attribute__((__noreturn__)) actually hinders portability rather than helping it. Given that mandoc already uses __attribute__ in several files and that in the portable version, ./configure already contains rudimentary support for ignoring it on platforms that do not support it, use __attribute__ directly. This is expected to fix build failures that Stephen Gregoratto <dev at sgregoratto dot me> reported from Arch and Debian Linux.
* mark check_abort() and post_abort() as __dead;Ingo Schwarze2019-03-112-6/+6
| | | | based on a patch by Christos@ Zoulas at NetBSD
* 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@