aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/manpath.c
Commit message (Collapse)AuthorAgeFilesLines
* Do not let the -m option or MANPATH with leading, trailing, or doubleIngo Schwarze2015-05-071-6/+8
| | | | | | | | | colon override the default manpath, let them add to the default manpath. Only override the default manpath by the -M option, by MANPATH without leading, trailing, or double colon, or by "manpath" in man.conf(5). Problem reported by Jan Stary <hans at stare dot cz>. Patch OK'ed by millert@.
* Fix the HAVE_MANPATH case, got broken in rev. 1.23.Ingo Schwarze2015-04-281-2/+2
| | | | Patch from Steffen Nurpmeso <sdaoden at yandex dot com>, thanks.
* Parse the new man.conf(5) "output" directive.Ingo Schwarze2015-03-271-27/+96
| | | | The next step will be to actually use the parsed data.
* 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-221-2/+1
|
* 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
* fix build when HAVE_MANPATH is set; patch from <bapt at FreeBSD>Ingo Schwarze2014-11-271-2/+2
|
* Ignore invalid directories in man.conf(5) and MANPATH, even if theirIngo Schwarze2014-11-181-16/+31
| | | | | | parent directories exist, but complain about invalid directories given on the command line. Intended to fix an oddity reported by sthen@.
* Improve build system and autodetection.Ingo Schwarze2014-08-161-2/+2
| | | | | | | | | * Make ./configure standalone, that's what people expect. * Let people write a ./configure.local from scratch, not edit existing files. * Autodetect wchar, sqlite3, and manpath and act accordingly. * Autodetect the need for -L/usr/local/lib and -lutil. * Get rid of config.h.p{re,ost}, let ./configure only write what's needed. * Let ./configure write a Makefile.local snippet, that's quite flexible.
* Get rid of HAVE_CONFIG_H, it is always defined; idea from libnbcompat.Ingo Schwarze2014-08-101-3/+3
| | | | | | Include <sys/types.h> where needed, it does not belong in config.h. Remove <stdio.h> from config.h; if it is missing somewhere, it should be added, but i cannot find a *.c file where it is missing.
* Audit malloc(3)/calloc(3)/realloc(3) usage.Ingo Schwarze2014-04-231-3/+3
| | | | | | | * Change eight reallocs to reallocarray to be safe from overflows. * Change one malloc to reallocarray to be safe from overflows. * Change one calloc to reallocarray, no zeroing needed. * Change the order of arguments of three callocs (aesthetical).
* KNF: case (FOO): -> case FOO:, remove /* LINTED */ and /* ARGSUSED */,Ingo Schwarze2014-04-201-4/+3
| | | | | remove trailing whitespace and blanks before tabs, improve some indenting; no functional change
* The files mandoc.c and mandoc.h contained both specialised low-levelIngo Schwarze2014-03-231-2/+2
| | | | | | | functions used for multiple languages (mdoc, man, roff), for example mandoc_escape(), mandoc_getarg(), mandoc_eos(), and generic auxiliary functions. Split the auxiliaries out into their own file and header. While here, do some #include cleanup.
* My audit of mandoc revealed one missing (unsigned char) castIngo Schwarze2013-11-211-2/+2
| | | | | in an isspace() argument containing arbitrary char data. Thanks to deraadt@ for triggering the audit.
* Some places used PATH_MAX from <limits.h>, some MAXPATHLEN from <sys/param.h>.Ingo Schwarze2013-06-051-6/+2
| | | | | | Consistently use the PATH_MAX since it is specified by POSIX, while MAXPATHLEN is not. In preparation for using this at a few more places.
* Sync to OpenBSD:Ingo Schwarze2013-05-291-3/+5
| | | | | | | | * Guard <sys/param.h> inclusion by #ifdef USE_MANPATH to make it more obvious why this isn't needed on OpenBSD. Noticed by deraadt@. * Resolve gratuitious whitespace differences: Blanks before tabs and on empty lines.
* Use size_t in manpath instead of int.Kristaps Dzonsons2012-06-081-6/+6
|
* Support leading, trailing and double colons in MANPATH to prepend,Kristaps Dzonsons2011-12-241-7/+46
| | | | | | | | append or insert the man.conf(5) default path; compatible with GNU manpath(1), implementation by kristaps@, heavily tweaked by schwarze@. Updates to MANPATH documentation applied to whatis.1, apropos.1, and catman.8 also.
* Remove stray warnx() left in the manpath.c code.Kristaps Dzonsons2011-12-131-2/+1
|
* Have manpath.c properly use manpath(1), that is, using -C and -m and so on.Kristaps Dzonsons2011-12-131-42/+53
| | | | | This also cleans up the code a little bit. While here, make some functions static that are only used within manpath.c.
* implement -C (alternative config file) for apropos(1) and mandocdb(8),Ingo Schwarze2011-12-121-6/+7
| | | | | including various tweaks to the whatis(8) manual; ok kristaps@
* Sync to OpenBSD, mostly gratuitous and whitespace differences,Ingo Schwarze2011-11-261-9/+10
| | | | | | | | | but a few serious things as well: * -M overrides MANPATH * -m prepends to the path * put back database close calls that got lost in mandocdb * missing sys/types.h in manpath.c, needed for size_t ok kristaps@
* Allow man.conf file to be assignable.Kristaps Dzonsons2011-11-241-4/+4
|
* Export the manpath_manconf() function, slightly reorderng manpath.c whileKristaps Dzonsons2011-11-241-14/+21
| | | | | doing so. This will be used by a jailed man.cgi, as the cache built by manup(8) creates a man.conf for it to use.
* Support for Open/NetBSD's /etc/man.conf and others' manpath(1).Kristaps Dzonsons2011-11-231-0/+167
Most of this code (except the manpath part) written by schwarze@. This isn't hooked into anything yet.