aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* escape a macro name that is not intended to be calledIngo Schwarze2016-12-281-3/+3
|
* correct spelling error; from jmc@Ingo Schwarze2016-12-281-2/+2
|
* Make the second, section number argument of .Xr mandatory.Ingo Schwarze2016-12-285-13/+37
| | | | | | In fact, we have been requiring it for many years. The only reason to not warn when it was missing was excessive traditionalism - it was optional in 4.4BSD.
* When reporting "whitespace at end of input line" on lines ending withIngo Schwarze2016-12-071-2/+4
| | | | | | roff(7) comments, let the column number in the message point to the end of the line rather than to the beginning of the comment. Improvement suggested by bluhm@.
* sync with NetBSD: add four new libraries;Ingo Schwarze2016-11-231-1/+5
| | | | triggered by a smaller patch from kamil@ via wiz@
* Do not install libmandoc.a by default.Ingo Schwarze2016-11-193-14/+31
| | | | | | The only environment where it is ever needed is NetBSD base. Even NetBSD ports and pkgsrc should better not install it. Triggered by a question from bentley@.
* warn about trailing whitespace at the end of comments;Ingo Schwarze2016-11-101-6/+12
| | | | missing feature noticed by jmc@
* document improved tagging functionalityIngo Schwarze2016-11-081-3/+15
|
* use .Fn in custom sections for tagging, in addition to in DESCRIPTION;Ingo Schwarze2016-11-081-2/+2
| | | | written on the TGV Paris-Strassbourg
* tag leading .Dv, .Li, and .No in .It;Ingo Schwarze2016-11-081-1/+2
| | | | written on the TGV Paris-Strassbourg
* implement tag priority 0, which will tag only keys that appear asIngo Schwarze2016-11-082-7/+37
| | | | | tag candidates exactly once, and use it for .Em and .Sy; written on the TGV Toulouse-Paris
* generate two tag entries from list entries of the formIngo Schwarze2016-11-081-2/+4
| | | | | .It Macro tag1 ... | Macro tag2 ... written on the TGV Toulouse-Paris
* skip leading \& and \e in tagsIngo Schwarze2016-11-081-2/+8
|
* support more than one tag entry for the same search term;Ingo Schwarze2016-11-081-8/+39
| | | | general idea discussed with bcook@ during l2k16
* cast off_t and uint64_t for printf(3)Ingo Schwarze2016-10-222-4/+5
| | | | | | to make sure that widths match on all platforms; from Ed Maste <emaste at freebsd dot org>; OK guenther@
* typo in informational message: s/UTF_LOCALE/UTF8_LOCALE/Ingo Schwarze2016-10-201-2/+2
|
* 0x%llu is a bad idea, make that 0x%llx;Ingo Schwarze2016-10-201-2/+2
| | | | noticed while investigating a report from Ed Maste
* st_size is off_t, which is signed, so use %lld rather than %llu;Ingo Schwarze2016-10-201-2/+2
| | | | noticed by Ed Maste when compiling on FreeBSD
* Avoid the confusion that -a might require a section argument; it does not.Ingo Schwarze2016-10-191-8/+4
| | | | | Triggered by a question from <jmates at ee dot washington at edu>. OK jmc@.
* bring back support for sortingIngo Schwarze2016-10-182-9/+66
|
* sync with OpenBSDIngo Schwarze2016-10-181-17/+12
|
* The termination condition of the iteration logic in page_bymacro()Ingo Schwarze2016-10-181-19/+23
| | | | | | | was overzealous. Consequently, macro=substr and macro~regexp searches only returned all pages containing the first matching macro value, rather than all pages containing any of the matching macro values. Bug reported by tb@ - thanks!
* Compat glue for the FreeBSD comparison function prototype for fts_open(3)Ingo Schwarze2016-10-184-19/+54
| | | | | which differs from what most other systems use. While here, improve diagnostic output of ./configure tests.
* update after rev. 1.5 of dba.cIngo Schwarze2016-10-181-1/+1
|
* Simplify and correct support for reproducible builds, such that databaseIngo Schwarze2016-10-182-39/+30
| | | | | | | | | | entries come in a well-defined order even in the presence of MLINKS. Do this by using the compar() argument of fts_open(3) rather than trying to sort later, which missed some cases. This also shortens the code by a few lines. Diff from Ed Maste <emaste @ FreeBSD>, adapted to our tree and tweaked a bit by me, final version confirmed by Ed.
* link to http://mdocml.bsd.lv/mdoc/ below SEE ALSO;Ingo Schwarze2016-10-111-2/+8
| | | | tweak and OK jmc@
* Delete complicated code dealing with .Bl -tag without -width,Ingo Schwarze2016-10-094-88/+7
| | | | | | | | | | | | and just let it default to -width 6n, which agrees with the traditional -width Ds that is still in widespread use. I just pushed a patch upstream to GNU roff that does the same for groff_mdoc(7). Before, groff contained code that was even more complicated than mandoc, but both resulted in quite different user-visible output. Now, both agree, and output is nicer for both. Useless complication noticed by Carsten Kunze (Heirloom roff).
* We cannot use fputs(3) in passthrough() because the stdout streamIngo Schwarze2016-09-181-5/+15
| | | | | | | | | | | | might be in stdio wide orientation due to prior formatting of an unformatted manual in man -aTutf8 mode. So for now, use fflush(3) followed by unbuffered write(2) instead. Fixes output corruption on glibc discovered on Linux while testing a diff to fix a loosely related bug reported by <jmates at ee dot washington dot edu>. I detest the concept of stdio stream orientation. One day, i will rewrite term_ascii.c to always use narrow streams, even in UTF-8 output mode. But that's too much work for today.
* Make sure an output device is allocated before calling terminal_sepline(),Ingo Schwarze2016-09-181-28/+35
| | | | | | fixing a NULL pointer access that happened when the first of multiple pages shown was preformatted, as in "man -a groff troff". Crash reported by <jmates at ee dot washington dot edu> on bugs@, thanks!
* minor tbl(7) column spacing and wrapping issues in lftp(1)Ingo Schwarze2016-09-131-1/+8
|
* use the proper HTML escape for double quote ("): &quot; not &quote;Ingo Schwarze2016-09-121-2/+2
| | | | patch from bentley@
* move zaurus down to the discontinued architecturesIngo Schwarze2016-09-031-4/+4
|
* When "makewhatis -d" tries to add to a database that doesn't (yet) exist,Ingo Schwarze2016-09-021-4/+4
| | | | | | | silently create it from scratch instead of printing a warning. The annoying warning message was reported by ajacoutot@, and espie@ convincingly argues that a non-existing database can be considered equivalent to an empty one.
* remove "sparc" from a commentIngo Schwarze2016-09-011-2/+2
|
* move "sparc" down to discontinued architecturesIngo Schwarze2016-09-011-4/+4
|
* When the database is corrupt in the sense of containing invalidIngo Schwarze2016-08-301-2/+16
| | | | | | | | | pointers in the pages table, do not access NULL pointers, but gracefully handle the errors. Similar patches will be needed for the macro tables, too. <attila at stalphonsos dot com> audited the code and pointed out to me that dbm_get() can return NULL for corrupted databases, but that isn't handled properly at various places.
* less confusing warning message about negative offsetsIngo Schwarze2016-08-301-2/+6
|
* If a line inside .Bl -column starts with a tab characterIngo Schwarze2016-08-281-2/+2
| | | | | | and there was no preceding .It macro, do not read the byte before the beginning of the line buffer. Found by tb@ with afl@.
* When trying to edit an existing database with makewhatis(8) -d or -uIngo Schwarze2016-08-221-5/+5
| | | | | | | but reading the database fails, report the full path to the database on standard error, and mention that the database is automatically recreated from scratch. Suggested by espie@.
* When running into a mandoc.db(5) file still using the obsoleteIngo Schwarze2016-08-221-3/+9
| | | | | | format based on SQLite 3, say so in words that mortals can understand rather than babbling about hex magic. Suggested by espie@.
* When a mismatching end macro occurs while at least two nested blocksIngo Schwarze2016-08-201-14/+23
| | | | | | | | are open, all except the innermost open block got a bogus MDOC_ENDED marker, in some situations triggering segfaults down the road which tb@ found with afl(1). Fix the logic error by figuring out up front whether an end macro has a matching body, and if it hasn't, don't mark any blocks as broken.
* When scanning upwards for a column list to put a .Ta macro in,Ingo Schwarze2016-08-201-2/+2
| | | | | ignore body end markers of lists breaking other blocks. Fixing a logical error that caused a NULL deref found by tb@ with afl(1).
* If a column list starts with implicit rows (that is, rows without .It)Ingo Schwarze2016-08-202-49/+54
| | | | | | and roff-level nodes (e.g. tbl or eqn) follow, don't run into an assertion. Instead, wrap the roff-level nodes in their own row. Issue found by tb@ with afl(1).
* fix an fd leak; patch from jsg@Ingo Schwarze2016-08-181-1/+2
|
* When the content of a manual page does not specify a section, theIngo Schwarze2016-08-174-16/+12
| | | | | | | | empty string got added to the list of sections, breaking the database format slightly and causing the page to not be considered part of any section, not even if a section could be deduced from the directory or from the file name. Bug found due to the bogus pcredemo(3) "manual" in the pcre-8.38p0 package.
* When reading back a mandoc.db(5) file in order to apply incrementalIngo Schwarze2016-08-172-6/+6
| | | | | | changes, do not prepend a stray NAME_FILE (0x10) byte to the first names of pages. Bug found while investigating another issue reported by sthen@.
* Make sure manuals in architecture-independent directories are treatedIngo Schwarze2016-08-171-2/+2
| | | | | | | | | as architecture-independent even if they abuse the third (architecture) argument of the .Dt macro for random stuff like "freetds reference manual". While the .Dt syntax is not the same as the .TH syntax in man(7), punishing offenders by treating them as architecture-dependent and hence completely excluding them from searches is too severe. Problem reported by sthen@.
* Even after switching from a pending head to the body, we have toIngo Schwarze2016-08-111-2/+2
| | | | | | continue scanning upwards, because the enclosing block might already be pending as well, e.g. .Bl .Bl .It Bo .El .It. Tree corruption leading to a later NULL deref found by tb@ with afl(1).
* oops, fix stupid typo in previousIngo Schwarze2016-08-111-2/+3
|
* If a .Bd display is on the one hand doomed to be deleted becauseIngo Schwarze2016-08-111-4/+5
| | | | | | | it has no type, but is on the other hand breaking another block, delete its end marker as well, or the end marker may remain behind as an orphan, triggering an assertion in the terminal formatter. Problem found by tb@ with afl(1).