aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
...
* First step towards parser unification:Ingo Schwarze2015-04-0228-573/+621
| | | | | | Replace enum mdoc_type and enum man_type by a unified enum roff_type. Almost mechanical, no functional change. Written on the ICE train from Frankfurt to Bruxelles on the way to p2k15.
* Let man(1) and apropos(1) work even when the current directoryIngo Schwarze2015-04-011-36/+34
| | | | | | | is unusable: Only change back to the current directory when the directory was changed before and the next path is relative. This is now more similar to what makewhatis(8) does. Issue reported by espie@.
* Escape punctuation characters that have a different meaning in -Tpdf.Ingo Schwarze2015-03-304-58/+54
| | | | | | | | ~, `, and ' get translated to non-ASCII characters by most troff implementations when generating PostScript/PDF output. When the original ASCII character is meant, it needs to be manually escaped. Patch from bentley@.
* refering -> referring; patch from jmc@Ingo Schwarze2015-03-271-2/+2
|
* Actually use the new man.conf(5) "output" directive.Ingo Schwarze2015-03-277-128/+98
| | | | Additional functionality, yet minus 45 lines of code.
* Parse the new man.conf(5) "output" directive.Ingo Schwarze2015-03-2712-141/+221
| | | | The next step will be to actually use the parsed data.
* Modernize documentation by inserting blanks between option lettersIngo Schwarze2015-03-272-62/+59
| | | | | | and option arguments, except for -m because "-m an" and "-m andoc" look just too weird. Of course, the traditional form without the blank will continue to work.
* various tweaks from jmc@Ingo Schwarze2015-03-271-25/+18
|
* oops, forgot to apply the actual patch...Ingo Schwarze2015-03-271-1/+23
|
* Document that certain stand-alone accents need escaping in rare cases toIngo Schwarze2015-03-271-3/+3
| | | | | prevent them from being converted to Unicode replacements in PDF output. Issue found by bentley@, OK jmc@ bentley@.
* Add man.conf(5). After adding some additional functionality,Ingo Schwarze2015-03-274-2/+132
| | | | | one of the next steps will be to use it in addition to manpath(1) rather than as an alternative to it.
* Add a new directive "manpath path"Ingo Schwarze2015-03-261-26/+42
| | | | | | to replace the legacy "_whatdb path/whatis.db". Keep _whatdb support for backward compat, for now. Discussed with many, jmc@ and ajacoutot@ agree with the general direction.
* make MANPATH_DEFAULT compile-time configurableIngo Schwarze2015-03-223-3/+11
|
* when there is no -m, no -M, no MANPATH and no /etc/man.conf,Ingo Schwarze2015-03-211-2/+6
| | | | fall back to /usr/share/man:/usr/X11R6/man:/usr/local/man
* vasprintf(3) needs _GNU_SOURCE on Linux;Ingo Schwarze2015-03-201-1/+5
| | | | pointed out by Christian Neukirchen <chneukirchen at gmail dot com>.
* Patch from Christian Neukirchen <chneukirchen at gmail dot com>:Ingo Schwarze2015-03-201-3/+7
| | | | | He reports that on some platforms, it is not possible to use the same va_list twice. So use va_copy(3) for additional safety.
* The .PD macro can occur in next-line scope. Fixes zshmisc(1).Ingo Schwarze2015-03-201-2/+2
| | | | Issue reported by Christian Neukirchen <chneukirchen at gmail dot com>.
* Simplify by almost halving the number of macro flags:Ingo Schwarze2015-03-202-25/+24
| | | | | | | 1. MAN_EXPLICIT was used iff fp == blk_exp, so just test fp. 2. MAN_FSCOPED was used only for TP, so just test for TP. 3. MAN_NOCLOSE was completely unused. No functional change.
* Compat glue needed for Solaris 9 and 10.Ingo Schwarze2015-03-1910-3/+249
| | | | | | | Thanks to Sevan Janiyan <venture37 at geeklan dot co dot uk> for reporting the Solaris 10 issues, to Jan Holzhueter <jh at opencsw dot org> for some additional insight, and to OpenCSW in general for providing me with a Solaris 9/10/11 testing environment.
* We always use FTS_NOCHDIR, so delete the directory changing code.Ingo Schwarze2015-03-182-171/+16
| | | | | | This not only simplifies matters, but also helps operating systems lacking dirfd(3), for example Solaris 10. Solaris dirfd issue reported by Sevan Janiyan <venture37 at geeklan dot co dot uk>.
* 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-27/+20
| | | | as an argument. No functional change.
* When the user exits the pager before the pager has drained all inputIngo Schwarze2015-03-172-3/+16
| | | | | | | | 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-1/+14
|
* Avoid off-by-one read access to the termacts array, which couldIngo Schwarze2015-03-151-2/+3
| | | | | 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-3/+3
| | | | | | 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-4/+119
|
* Fix hardlink detection on platforms having padding in struct inodev,Ingo Schwarze2015-03-131-1/+2
| | | | | | 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-4/+10
| | | | | 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-2/+2
| | | | Cluestick applied by joerg at NetBSD.
* The st_size member of struct stat is off_t, which is signed,Ingo Schwarze2015-03-101-2/+2
| | | | | 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-27/+23
| | | | | 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-4/+22
| | | | | | | | | | | | 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-91/+26
|
* use \(dq rather than \*q; patch from bentley@Ingo Schwarze2015-03-091-24/+24
|
* Fix vertical spacing at the beginning of tables.Ingo Schwarze2015-03-063-12/+7
| | | | | | 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-4/+7
| | | | Instead, use the same logic as for man(7).
* prevent the skipvsp flag from creeping past actual textIngo Schwarze2015-03-061-1/+2
|
* Flush the line preceding a table before clearing the right margin,Ingo Schwarze2015-03-061-3/+4
| | | | | 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-5/+7
| | | | | | 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-2/+4
| | | | patch from bentley@
* If an eqn(7) starts on a new input line, be sure to output whitespaceIngo Schwarze2015-03-032-2/+6
| | | | | | | 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-1/+2
| | | | | | 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-2/+3
| | | | | | | | | | 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-13/+49
| | | | | | | 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-1/+5
|
* improve NAME section diagnostics;Ingo Schwarze2015-02-235-46/+60
| | | | confusing messages reported by Jan Stary <hans at stare dot cz>
* Escape quotes when expanding macro arguments.Ingo Schwarze2015-02-211-17/+77
| | | | 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-1/+9
| | | | | | | 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.