summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Pass the CC set in configure.local to Makefile.local.Ingo Schwarze2015-03-181-0/+1
| | | | Issue found while testing on opencsw.org.
* Simplify: Now that rc is global anyway, no need to pass it aroundIngo Schwarze2015-03-171-26/+19
| | | | as an argument. No functional change.
* When the user exits the pager before the pager has drained all inputIngo Schwarze2015-03-172-1/+14
| | | | | | | | from man(1), man(1) dies from SIGPIPE. Exiting man(1) is fine in this case, generating more output would be pointless, but without handling SIGPIPE, the exit code from man(1) was wrong and csh(1) printed an ugly message "Broken pipe". Fix this by handling SIGPIPE explicitly. Issue noticed by deraadt@.
* naddy@ found a tough problem - fittingly, in cobfusc(1)...Ingo Schwarze2015-03-161-0/+13
|
* Avoid off-by-one read access to the termacts array, which couldIngo Schwarze2015-03-151-1/+2
| | | | | sometimes result in missing line breaks before subsection headers. Found by carsten dot kunze at arcor dot de on SuSE 13.2.
* Remove the first comma from constructs like ", and," and ", or,":Ingo Schwarze2015-03-131-1/+1
| | | | | | You can use "and" and "or" to join sentence clauses, and you can use commas, but both hinders reading; patch from jmc@.
* release 1.13.3VERSION.1.13.3Ingo Schwarze2015-03-132-2/+117
|
* Fix hardlink detection on platforms having padding in struct inodev,Ingo Schwarze2015-03-131-0/+1
| | | | | | typically 64bit platforms. This was basically broken since forever. Not only is the padding used, but it was used uninitialized. Problem reported by jmc@.
* When manpath(1) is available, enable HAVE_MANPATH even when buildingIngo Schwarze2015-03-111-3/+1
| | | | | without database support. Required now that we have man(1) even without database support.
* When interpreting the -O argument as a macro name fails,Ingo Schwarze2015-03-112-2/+8
| | | | | fall back to showing Nd rather than not showing anything. Issue reported by jmc@.
* Fix previous: size_t is often narrower than off_t.Ingo Schwarze2015-03-111-1/+1
| | | | Cluestick applied by joerg at NetBSD.
* The st_size member of struct stat is off_t, which is signed,Ingo Schwarze2015-03-101-1/+1
| | | | | all required by POSIX. So don't compare it against against an unsigned constant.
* We can keep track of the pager PID without additional complexity.Ingo Schwarze2015-03-101-26/+22
| | | | | No functional change for now, but more robust in case anybody should ever add additional child processes.
* Fix a regression caused in rev. 1.212, reported by kristaps@:Ingo Schwarze2015-03-101-3/+21
| | | | | | | | | | | | When using a pager and the first manual shown is gzip'ed, the gunzip(1) process ended up as a child of the pager process such that the man(1) process couldn't wait for it, preventing proper display of the manual. Solve this by making the pager a child of the man(1) process (instead of the other way round), which requires being a bit more careful about properly closing file descriptors after use and waiting for the pager before exiting man(1).
* update for 1.13.3Ingo Schwarze2015-03-091-90/+25
|
* use \(dq rather than \*q; patch from bentley@Ingo Schwarze2015-03-091-22/+22
|
* Fix vertical spacing at the beginning of tables.Ingo Schwarze2015-03-063-9/+4
| | | | | | man(7) always prints a blank line, mdoc(7) doesn't. Problem in mdoc(7) reported by kristaps@. mdoc(7) part of the patch tested by kristaps@.
* In mdoc(7), don't mistreat negative .sp arguments as large positive ones.Ingo Schwarze2015-03-061-3/+6
| | | | Instead, use the same logic as for man(7).
* prevent the skipvsp flag from creeping past actual textIngo Schwarze2015-03-061-0/+1
|
* Flush the line preceding a table before clearing the right margin,Ingo Schwarze2015-03-061-2/+3
| | | | | such that that line isn't output with unlimited width. Problem reported and fix OK by kristaps@.
* Allow compilation on Mac OS X, which doesn't have MACHINE defined.Kristaps Dzonsons2015-03-062-3/+5
| | | | | | While there, specify some casts to satisfy the compiler warnings. OK schwarze@
* in eqn, "prime" is equivalent to \(fm, and - is equivalent to \(mi;Ingo Schwarze2015-03-041-1/+3
| | | | patch from bentley@
* If an eqn(7) starts on a new input line, be sure to output whitespaceIngo Schwarze2015-03-032-0/+4
| | | | | | | in front of it. Issue found by tedu@ in glOrtho(3). There are also cases of excessive whitespace before and after equations. This patch neither fixes them nor makes them worse.
* If a non-gz manual is read after a gzipped manual, refrainIngo Schwarze2015-03-021-0/+1
| | | | | | from throwing a bogus error "wait: No child processes". As reported by Baptiste Daroussin <bapt at FreeBSD dot org>, clearing the state variable curp->child after use was forgotten.
* When makewhatis(8) scans a tree, ignore trailing garbage on filenames.Ingo Schwarze2015-02-271-1/+2
| | | | | | | | | | This is relevant because some ports install files like man1/xsel.1x, as reported by patrick keshishian <pkeshish at gmail dot com> on misc@. We can probably improve functionality and simplify the code by ignoring file name extensions altogether; we already know the section number from the name of the directory. But so close to lock, i'm keeping the fix minimal.
* When man(1) and apropos(1) look for a file man1/foo.1 but it's unavailable,Ingo Schwarze2015-02-272-11/+47
| | | | | | | fall back to glob(man1/foo.*), which is more like what old man(1) did. Do this both for file names from the database and for fs_lookup(). This is relevant because some ports install files like man1/xset.1x. Regression reported by patrick keshishian <pkeshish at gmail dot com>.
* oops, in NAME, don't nag about the comma after .NmIngo Schwarze2015-02-231-0/+4
|
* improve NAME section diagnostics;Ingo Schwarze2015-02-235-39/+53
| | | | confusing messages reported by Jan Stary <hans at stare dot cz>
* Escape quotes when expanding macro arguments.Ingo Schwarze2015-02-211-16/+76
| | | | This fixes a bug naddy@ found in plan9/rc(1).
* For selecting a two-digit font size, support the historic syntax \s12Ingo Schwarze2015-02-201-0/+8
| | | | | | | in addition to the classic syntax \s(12, the modern syntax \s[12], and the alternative syntax \s'12'. The historic syntax only works for the font sizes 10-39. Real-world usage found by naddy@ in plan9/rc.
* Completely delete all carriage return characters from the input.Ingo Schwarze2015-02-201-1/+2
| | | | | | | No change to messages about them (ignore them right before line feeds, report errors elsewhere). naddy@ found a manual in the wild containing lots of these (ysm(1)), and i can't imagine a situation where dropping them could be problematic.
* \n(.$Ingo Schwarze2015-02-201-0/+4
|
* naddy@ scoured the ports tree for remaining mandoc issuesIngo Schwarze2015-02-171-4/+6
| | | | and identified two top priority issues
* Render \(lq and \(rq as '"' in -Tascii mode but leave the renderingIngo Schwarze2015-02-176-52/+54
| | | | | | of .Do/.Dc, .Dq, .Lb, and .St untouched. Reduces groff-mandoc differences in OpenBSD base by about 7%. Reminded of the issue by naddy@.
* Cope with another one of the many kinds of DocBook stupidity:Ingo Schwarze2015-02-171-2/+11
| | | | | | | | | | | | | | Instead of just using .br, DocBook sometimes fiddles with the utterly unportable internal register \n[an-break-flag] that is only available in the GNU implementation of man(7) and then arms an input line trap to call the equally unportable internal macro .an-trap that, in the GNU implementation, inspects that variable; all the world is GNU, isn't it? Since naddy@ reports that quite a few ports manuals suffer from this insanity, let's just translate it to the intended .br. Et ceterum censeo DocBookem esse delendam.
* Let .it accept numerical expressions, not just numerical constants.Ingo Schwarze2015-02-172-40/+50
| | | | | | | For .it, ignore scaling units in roff_getnum(). Inside parentheses, skip whitespace after a sign in roff_getnum(). Parse and ignore unary plus in roff_getnum(). As a bonus, get rid of the only call to mandoc_strntoi() in roff.c.
* clean up post_dt() validation function;Ingo Schwarze2015-02-162-42/+43
| | | | improved diagnostics, minus six lines of code
* Delete the -V option. It serves no purpose but keeps confusing people.Ingo Schwarze2015-02-166-32/+10
| | | | | | | | Keeping track of the versions of installed software is the job of the package manager, not of the individual binaries. If individual binaries include version numbers, that tends to goad people into writing broken configuration tests that inspect version numbers instead of properly testing for features.
* strtonum(3) compat glueIngo Schwarze2015-02-167-3/+134
|
* Clamp width and indent settings to sensible values.Ingo Schwarze2015-02-161-2/+8
| | | | | Ignore errors for now. Patch from tedu@.
* Tweak the wording to avoid the possible misunderstanding that .InIngo Schwarze2015-02-151-5/+6
| | | | | could only be used in the SYNOPSIS section. It is fine anywhere. Issue noticed by bentley@.
* shut up about tabs in SYNOPSIS .Fd lines, there is no good way to avoid themIngo Schwarze2015-02-141-1/+2
|
* After almost five years and 99 revisions, mdoc_macro.c rev. 1.182Ingo Schwarze2015-02-121-4/+0
| | | | | finally fixed the four issues explained in the mdoc_macro.c rev. 1.83 commit message.
* Do not confuse .Bl -column lists that just broken another blockIngo Schwarze2015-02-121-4/+4
| | | | | | with newly opened .Bl -column lists; fixing an assertion failure jsg@ found with afl: test case #481, Bl It Bl -column It Bd El text text El
* Delete the mdoc_node.pending pointer and the function calculatingIngo Schwarze2015-02-127-167/+108
| | | | | | | | | | | | | | | | | | | | | | | it, make_pending(), which was the most difficult function of the whole mdoc(7) parser. After almost five years of maintaining this hellhole, i just noticed the pointer isn't needed after all. Blocks are always rewound in the reverse order they were opened; that even holds for broken blocks. Consequently, it is sufficient to just mark broken blogs with the flag MDOC_BROKEN and breaking blocks with the flag MDOC_ENDED. When rewinding, instead of iterating the pending pointers, just iterate from each broken block to its parents, rewinding all that are MDOC_ENDED and stopping after processing the first ancestor that it not MDOC_BROKEN. For ENDBODY markers, use the mdoc_node.body pointer in place of the former mdoc_node.pending. This also fixes an assertion failure found by jsg@ with afl, test case #467 (Bo Bl It Bd Bc It), where (surprise surprise) the pending pointer got corrupted. Improved functionality, minus one function, minus one struct field, minus 50 lines of code.
* do not access a NULL pointer if an .Eo block lacks a tail;Ingo Schwarze2015-02-113-9/+6
| | | | found by jsg@ with afl, test case #16
* explicit blocks close out .Nd; fixing data structure corruptionIngo Schwarze2015-02-111-0/+7
| | | | | eventually leading to NULL pointer access; found by jsg@ with afl, text case #455.
* Be more careful to not generate empty .In, .St, and .Xr nodes.Ingo Schwarze2015-02-101-33/+43
| | | | | | | | That could happen when their first argument was another called macro, causing a NULL pointer access in .St validation found by jsg@ with afl. Make in_line_argn() easier to understand by using one state variable rather than two.
* Do not read past the end of the buffer if an "f" layout font modifierIngo Schwarze2015-02-101-10/+26
| | | | | | | | | | | is followed by the end of the input line instead of a font specifier. Found by jsg@ with afl, test case #591. While here, improve functionality as well: * There is no "r" font modifier. * Font specifiers (as opposed to font modifiers) are case sensitive. * One-character font specifiers require trailing whitespace. * Ignore parenthised and two-letter font specifiers.
* trim trailing white space, no code change;Ingo Schwarze2015-02-1010-38/+38
| | | | from Svyatoslav Mishyn <juef at openmailboxd dot org>, Crux Linux