summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix block scoping error if an explicit block is broken by twoIngo Schwarze2017-02-164-12/+31
| | | | | | | | | implicit blocks (.Aq Bq Po .Pc) that left the outer breaker open and could in exceptional cases, like between .Bl and .It, cause tree corruption leading to NULL dereference. Found by tb@ with afl(1). While here, do not mark intermediate ENDBODY markers as broken.
* Remove the ENDBODY_NOSPACE flag, simplifying the code.Ingo Schwarze2017-02-167-21/+7
| | | | | | | | Comparing to groff output, it appears that all cases where it was used and made a difference actually require the opposite, ENDBODY_SPACE. I have no idea why i added it back in 2010; maybe to compensate for some other bug that has long been fixed.
* Style improvement, no functional change.Ingo Schwarze2017-02-151-7/+6
| | | | | | | | | | As reported by Yuri Pankov, some versions of GCC whine that "tmp" might be used uninitialized in fts_open(3). Clearly, that cannot actually happen, but explicitly setting it to NULL is safer anyway. While here, rename the badly named variable "tmp" and make the inner "if" easier to understand. Feedback and OK guenther@
* Fix previous: I forgot that i had to change the convention howIngo Schwarze2017-02-151-1/+1
| | | | | a node is marked as "not a macro" when unifying the parsers. Confirmed to work by Sevan Janiyan.
* Do not access a NULL pointer if a matrix or square root are empty.Ingo Schwarze2017-02-129-11/+43
| | | | Crashes found by tb@ with afl(1).
* Do not read one element past the end of the static const termacts array.Ingo Schwarze2017-02-111-1/+2
| | | | | | | Bug found by Sevan Janiyan <venture37 at geeklan dot co dot uk> who ran the OpenBSD mandoc test suite on Ubuntu on POWER8 (sic!) and reported that mdoc/Sh/before.in failed in -Tman mode. If that isn't power testing, i don't know...
* new regression tests for mdoc_macro.c revs. 1.211-1.215Ingo Schwarze2017-02-1113-12/+85
|
* Disable three UTF-8 tests that expose bugs in wcwidth(3) in theIngo Schwarze2017-02-111-1/+1
| | | | | | | | | | | | native C libraries of illumos, Oracle Solaris 11, and SunOS 5.10. While it is useful to catch wcwidth(3) regressions on OpenBSD, the purpose of the *portable* mandoc regression suite is not to check the C library of the host system; that would just hide genuine mandoc portability issues in the noise. The remaining UTF-8 tests are still sufficient to establish that mandoc does the right thing. Issues reported by Sevan Janiyan <venture37 at geeklan dot co dot uk> after testing on OmniOS.
* Never look for broken blocks inside blocks that are already closed.Ingo Schwarze2017-02-112-3/+6
| | | | | Fixes the last the of tree corruptions sometimes causing NULL dereference reported by tb@; this one triggered in cases like: .Bl -column .It Pq Ta
* Do not prematurely close .Nd containing a broken child.Ingo Schwarze2017-02-112-3/+11
| | | | | | Fixes tree corruption leading to NULL dereference in insane cases like .Oo Oo .Nd .Pq Oc .Oc Oc found by tb@ with afl(1).
* Do not prematurely mark intermediate blocks as broken while scanningIngo Schwarze2017-02-111-9/+16
| | | | | backwards. Only do so when a block is found that is actually broken. Logic error found while investigating crashes reported by tb@.
* For child macros of block-end macros, only scan backwards for pendingIngo Schwarze2017-02-101-6/+7
| | | | | | | | breakers unless the parent of the block is already closed. While the scanning is needed in cases like ".Ac Bo" for broken Ao, it is useless and crashy in cases like ".Ac Bc" for non-broken Ao. This fixes a NULL pointer dereference that tb@ found with afl(1).
* In the SYNOPSIS, .Nm blocks can get broken if one of their childrenIngo Schwarze2017-02-102-6/+16
| | | | | | | | | | | | gets broken. In that case, mark them as BROKEN and ENDED and make sure they get closed out together with the child. Fixes tree corruption leeding to a NULL dereference found by tb@ with afl(1) in: .Sh SYNOPSIS .Bl .Oo .Nm .Bk .Oc .It (where .Bk is the child and .Oo is the breaker). A simpler form of the same corruption (without crash) is visible in: .Sh SYNOPSIS .Ao .Nm .Bo .Ac .Bc text where the text ended up inside the .Nm (child .Bo, breaker .Ao).
* In -Ttree output mode, show the BROKEN node flag andIngo Schwarze2017-02-106-7/+29
| | | | provide a -Onoval output option to show the unvalidated tree.
* same as mandocdb.c rev. 1.196:Ingo Schwarze2017-02-091-2/+3
| | | | | for portability, use (char *)NULL in execlp(3) as discussed on tech@ OpenBSD (didn't blow up anywhere yet, but better safe than sorry)
* Illumos doesn't have O_DIRECTORY. Work around that for now, mayIngo Schwarze2017-02-091-0/+4
| | | | | fix it better after the 1.14.1 release. Portability issue reported by Sevan Janiyan <venture37 at geeklan dot co dot uk>.
* Escape literal braces in a regular expression.Ingo Schwarze2017-02-091-1/+1
| | | | Deprecated perlre(1) syntax reported by Thomas Klausner and Sevan Janiyan.
* On some systems (e.g. Solaris 11) diff(1) does not support -a.Ingo Schwarze2017-02-081-5/+9
| | | | Make it easier to get rid of it.
* mention that BUILD_CATMAN doesn't work on SunOS 5.9 and 5.10Ingo Schwarze2017-02-081-0/+2
|
* config glue for recvmsg(2) and CMSG_FIRSTHDR(3);Ingo Schwarze2017-02-087-1/+73
| | | | needed for Solaris 11
* sendmsg(3) may block, so retryIngo Schwarze2017-02-081-1/+18
|
* even catman needs libmandoc on systems not having ftsIngo Schwarze2017-02-081-2/+2
|
* protect <err.h> inclusionIngo Schwarze2017-02-081-0/+2
|
* more 1.14.1 release preparationsIngo Schwarze2017-02-085-22/+42
|
* reference a relevant mail for one TODO itemIngo Schwarze2017-02-081-1/+1
|
* remove some instances of MdocdateIngo Schwarze2017-02-083-3/+3
|
* disable some tests that expose wcwidth(3) differences among systemsIngo Schwarze2017-02-081-1/+4
|
* Finally port the OpenBSD regression suite.Ingo Schwarze2017-02-081244-0/+23823
| | | | | Both kristaps@ and wiz@ repeated asked for this, literally for years.
* first draft of NEWS for 1.14.1Ingo Schwarze2017-02-071-0/+107
|
* new manual pages for catman(8) and mandocd(8)Ingo Schwarze2017-02-063-1/+391
|
* Polishing:Ingo Schwarze2017-02-062-18/+53
| | | | | | | | | | * support -Ios= * create missing directories * fix output file permissions * error out on comminication failures I now consider this good enough for a first release. Bugs and missing features are still likely, though.
* explicitly pass -Tascii to mandoc(1), such that LC_CTYPE does notIngo Schwarze2017-02-061-2/+2
| | | | get into the way, and fix the usage() while here
* The .Nm macro does not only use the default name when it has noIngo Schwarze2017-02-064-9/+13
| | | | | | | | | | argument, but also when the first argument is a child macro. Arcane issue found in the FreeBSD cxgbetool(8) manual that Baptiste Daroussin <bapt at FreeBSD> sent me long ago for a different reason. While solving this, switch to the new technique of doing text production in the validator, reducing code duplication in the formatters, which also makes -Ttree output clearer.
* uint8_t requires <stdint.h>; from Michael StapelbergIngo Schwarze2017-02-051-0/+1
|
* document output spacing near delimitersIngo Schwarze2017-02-051-1/+3
|
* remove several things that were taken care of in the pastIngo Schwarze2017-02-051-25/+0
|
* add missing file man.options.1Ingo Schwarze2017-02-051-0/+1
|
* document hyphenationIngo Schwarze2017-02-051-0/+24
|
* Wrap .St content in a <span class="St">.Ingo Schwarze2017-02-052-2/+11
| | | | Also add forgotten <span class="Ux"> to .At rendering.
* fix font selection for .Bf without argumentIngo Schwarze2017-02-051-1/+1
|
* mark up .Ar, .Fa, .Va, .Ft, and .Vt with <var> rather than <i>;Ingo Schwarze2017-02-055-17/+21
| | | | suggested by bentley@ long ago, but needed lots of cleanup first
* for .Rs, use <cite>Ingo Schwarze2017-02-054-2/+5
|
* Improve <table> syntax:Ingo Schwarze2017-02-055-13/+17
| | | | | | | | The <col> element can only appear inside <colgroup>, so use <colgroup>. The <tbody> element is optional and useless, so don't use it. Even if we would ever need <thead> or <tfoot>, <tbody> would still be optional and useless; besides, we will likely never need <thead> or <tfoot>, simply because our languages don't support such functionality.
* experimental mandocd(8) and catman(8)Ingo Schwarze2017-02-045-9/+519
| | | | for development in the tree, not yet ready for production
* Do not fix the default indent for all subsequent files; some may useIngo Schwarze2017-02-042-1/+7
| | | | | a different macro language and hence require a different indent. You can see the effect with "man -a 1 host hostname".
* Minor cleanup, no functional change:Ingo Schwarze2017-02-031-6/+6
| | | | | | | We always have a roff parser, so mparse_free() does not need to check for existence before freeing it. Also arrange code in struct mparse, mparse_reset(), and mparse_free() in the same order for readability.
* more work found in old mailsIngo Schwarze2017-02-031-1/+17
|
* If an application parses multiple files with mparse_readfd(3) butIngo Schwarze2017-02-031-0/+1
| | | | | | | | | without using mparse_open(3) to open the files, and if one of the files includes a gzip'ed file with .so, then the gzip flag remains set and the next main file will be expected to be gzip'ed. Fix this by clearing the gzip flag in mparse_reset(3). Bug found and patch provided by Michael <Stapelberg at debian dot org>.
* even man-1.6g does *not* have apropos -C,Ingo Schwarze2017-02-021-5/+0
| | | | maybe it is MacOS X specific, i don't know...
* correct information about early groff (up to 1.02)Ingo Schwarze2017-02-021-39/+42
|