summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/manpath.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Ignore invalid directories in man.conf(5) and MANPATH, even if theirschwarze2014-11-181-16/+32
| | | | | | parent directories exist, but complain about invalid directories given on the command line. Intended to fix an oddity reported by sthen@.
* Audit malloc(3)/calloc(3)/realloc(3) usage.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 */,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-levelschwarze2014-03-211-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 two missing (unsigned char) castsschwarze2013-11-211-2/+2
| | | | | in isspace() and tolower() arguments containing arbitrary char data. Thanks to deraadt@ for triggering the audit.
* Trivial sync to bsd.lv:schwarze2013-05-291-5/+5
| | | | | Kristaps changed the size member of struct manpaths from int to size_t. No functional change.
* remove some unnecessary sys/param.h inclusionsderaadt2012-12-041-3/+1
|
* Support leading, trailing and double colons in MANPATHschwarze2011-12-241-6/+44
| | | | | | to prepend, append or insert the man.conf(5) default path; compatible with GNU manpath(1), implementation by kristaps@, heavily tweaked by me.
* Improvements from kristaps@:schwarze2011-12-191-11/+6
| | | | | | | | | | (1) Make the database format simpler and smaller by - storing the file type as a single character and - storing paths relative to the dir containing the database. The latter allows to move trees around. Both together typically save 15-25% of the index size. (2) Make sure apropos(1) "any" really covers all search keys. (3) Make manpath_parseline() static, drop manpath_parseconf() completely.
* implement -C (alternative config file) for apropos(1) and mandocdb(8);schwarze2011-12-121-6/+7
| | | | ok kristaps@
* Resync to bsd.lv, most code from kristaps@.schwarze2011-11-261-0/+141
In particular, support the MANPATH environment variable and don't confuse index record numbers when working with multiple mandoc databases at once. Besides, remove lots of gratuitious code and whitespace differences.