summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add a blank after ">" when quoting.Ingo Schwarze2017-03-081-1/+7
| | | | If is allowed by markdown syntax and more human-readable.
* prevent infinite recursion while expanding the argumentsIngo Schwarze2017-03-084-3/+23
| | | | of a user-defined macro; issue found by tb@ with afl(1)
* If a user-defined macro is aborted because it exceeds the stackIngo Schwarze2017-03-075-10/+43
| | | | | | | | | | | | | | | | | | | limit, usually due to infinite recursion, discard whatever remains in all those open stack levels. Otherwise, insane constructions like the following could generate macros of enormous size, causing mandoc(1) to die from memory exhaustion: .de m \" original macro definition .m \" recursion to blow up the stack .de m \" definition to be run during the call of .m marked (*) very long plain text (some kilobytes) .m \" expand the above a thousand times while unwinding the stack .. \" end of the original definition .m \" (*) recursively generate a ridiculously large macro .. \" end of recursively generated definition .m \" execute the giant macro, exhausting memory Very creative abuse found by tb@ with afl(1).
* Escape blanks at the end of markdown linesIngo Schwarze2017-03-072-12/+23
| | | | such that they don't look like output line breaks.
* fix completely empty .Eo: no blank line wantedIngo Schwarze2017-03-073-9/+40
|
* fix spacing after empty .FlIngo Schwarze2017-03-073-3/+13
|
* implement .An -split and -nosplitIngo Schwarze2017-03-075-2/+95
|
* Fix .In formatting in the SYNOPSIS:Ingo Schwarze2017-03-076-11/+85
| | | | No ‌ in the middle of **, please.
* Using .Nd only makes sense in the NAME section.Ingo Schwarze2017-03-065-0/+16
| | | | | Warn if that macro occurs elsewhere. Triggered by a question from Dag-Erling Smoergrav <des @ FreeBSD>.
* URIs need different escaping; reported by reyk@Ingo Schwarze2017-03-062-5/+14
|
* first batch of -T markdown testsIngo Schwarze2017-03-05231-8/+3706
|
* Infrastructure for -T markdown tests.Ingo Schwarze2017-03-052-5/+37
| | | | | | This is needed because -T marksdown is expected to receive less maintenance than -T ascii, so we need automation to make sure that regular parser maintenance doesn't break this output mode.
* Remove a redundant condition in .%T handling, no functional change.Ingo Schwarze2017-03-042-8/+4
| | | | Found by jsg@ with scan-build.
* Make the description of -K autodetection easer to understand.Ingo Schwarze2017-03-041-11/+19
| | | | Basic idea suggested by jmc@, OK jmc@.
* Debian needs relative symlinks not only for manual pages,Ingo Schwarze2017-03-043-13/+23
| | | | | | but also for program files. Issue reported by Michael <Stapelberg at debian dot org> and by Markus <Waldeck at gmx dot de>.
* Markdown output mode helped us to find the first parser bug (as such,Ingo Schwarze2017-03-031-8/+9
| | | | | | | | | | this bug could cause wrong output in other modes as well): Do not misinterpret tab characters as .Ta macros when they appear on non-column .It lines in non-column .Bl lists that are nested inside a parent .Bl -column list. (Admittedly, such constructions are not very useful; don't use them!) Found by tb@ with afl(1) because the resulting tree corruption triggered an assertion in the markdown output module.
* new -mdoc -Tmarkdown output mode; OK millert@ reyk@ tb@;Ingo Schwarze2017-03-036-9/+1490
| | | | thanks to reyk@ and to Vsevolod at FreeBSD for suggesting it
* remove a few redundant conditions that jsg@ found with cppcheckIngo Schwarze2017-03-034-4/+4
|
* Fix a copy-and-paste error that caused man(7) manuals withoutIngo Schwarze2017-03-031-1/+1
| | | | | a section number in .TH to be misinterpreted as preformatted. Found by jsg@ with cppcheck.
* A missing initialization could randomly cause regular expressionIngo Schwarze2017-03-031-0/+1
| | | | | searches to be case-insensitive that ought to be case sensitive. Found by jsg@ with scan-build.
* Fix previous: do not access the byte before the string if the stringIngo Schwarze2017-03-031-1/+1
| | | | is empty; found by jsg@ with afl(1).
* Pledge man.cgi(8).Ingo Schwarze2017-02-221-0/+16
| | | | | Based on a more complicated patch from semarie@. Sebastien and tb@ both agree with the simplification.
* Since SQLite is gone, we no longer need the "flock" pledge.Ingo Schwarze2017-02-221-2/+2
| | | | Patch from semarie@, OK tb@.
* Handle an odd edge case where .It is preceded by .Sm.Ingo Schwarze2017-02-221-0/+1
| | | | | NULL dereference in man.cgi reported by Gabriel Guzman <gabe at guzman dash nunez dot com> on misc@.
* Debian wants relative, not absolute symlinks for man pages;Ingo Schwarze2017-02-221-2/+1
| | | | suggested by Michael Stapelberg
* fix spelling error;Ingo Schwarze2017-02-211-1/+1
| | | | found by Michael <Stapelberg at debian dot org> with Lintian
* release 1.14.1VERSION.1.14.1Ingo Schwarze2017-02-212-13/+21
|
* resolve trivial differences with OpenBSD:Ingo Schwarze2017-02-181-3/+1
| | | | | * we include <sys/types.h> for size_t, so we don't need <stdint.h> * sort declarations in read_whole_file()
* add some regress targetsIngo Schwarze2017-02-181-0/+28
|
* preconv_encode() can take a const input buffer;Ingo Schwarze2017-02-182-7/+7
| | | | diff from <christos at NetBSD>
* Provide an uninstall target, to help cleaning up after installingIngo Schwarze2017-02-181-7/+50
| | | | with the wrong DESTDIR. Use with care.
* proper test for O_DIRECTORYIngo Schwarze2017-02-186-10/+12
|
* double quotes were fixed, finallyIngo Schwarze2017-02-181-4/+1
|
* Use typographic quotes rather than '"' for .Rs %T (no change for -TasciiIngo Schwarze2017-02-177-6/+70
| | | | | output, of course). Patch from bentley@ in November 2014. This can be committed now because groff merged Anthony's patch yesterday.
* Many people have been complaining for a long time that ``...'' looksIngo Schwarze2017-02-1711-17/+16
| | | | | | | | | | | ugly in -Tascii output. For that reason, bentley@ submitted patches to render "..." instead to groff in November 2014 (yes, more than two years ago). Carsten Kunze yesterday merged them for the upcoming groff-1.22.4 release. Yay! Consequently, do the same in mandoc: Render \(Lq and \(Rq (which are used for .Do, .Dq, .Lb, and .St) as '"' in -Tascii output. All other output modes including -Tutf8 remain unchanged.
* more tests for .IP/.nf interaction that i forgot to commitIngo Schwarze2017-02-172-2/+69
|
* No need to cast NULL when assigning it to a variable;Ingo Schwarze2017-02-171-1/+1
| | | | from Christos Zoulas <christos at NetBSD>.
* Improve clarity of some casts;Ingo Schwarze2017-02-172-7/+7
| | | | from Christos Zoulas <christos at NetBSD>.
* Make the directory explicit where source files are located.Ingo Schwarze2017-02-171-1/+4
| | | | | This is simple and seems to help the NetBSD build infrastructure. From Christos Zoulas <christos at NetBSD>.
* Be consistent in protecting __attribute__ attributes with __;Ingo Schwarze2017-02-178-9/+9
| | | | from Christos Zoulas <christos @ NetBSD>.
* Fix a read buffer overrun that copied random data from memory intoIngo Schwarze2017-02-171-3/+11
| | | | | | | | | | | text nodes when a string passed to deroff() ended in a backslash and the byte after the terminating NUL was non-NUL, found by tb@ with afl(1). Invalid bytes so copied with the high bit set could later sometimes trigger another out of bounds read access to static memory in roff_strdup(), so add an assertion there to abort safely in case of similar data corruption.
* add $(LN) configuration variable; requested by Michael <Stapelberg@debian.org>Ingo Schwarze2017-02-163-7/+18
|
* fix previous: stupid typoIngo Schwarze2017-02-161-2/+2
|
* Provide a variable BINM_CATMAN.Ingo Schwarze2017-02-164-5/+15
| | | | Suggested by Michael <Stapelberg@debian.org>.
* Surprisingly, groff does not support scaling units in .Bl -columnIngo Schwarze2017-02-164-9/+15
| | | | | | column width specifiers, so stop supporting them, too. As a side effect, this fixes an assertion failure that tb@ found with afl(1), triggered by: .Bl -column -4n
* Fix rev. 1.280: -O syntax is different in default apropos(1) outputIngo Schwarze2017-02-161-17/+22
| | | | | mode and in other output modes, so do not error out prematurely. Also sort local variables in main() while here.
* 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.