History log of /openbsd-src/usr.bin/mandoc/manpath.c (Results 1 – 25 of 31)
Revision Date Author Comments
# b79f6b43 05-Nov-2021 schwarze <schwarze@openbsd.org>

Make sure that the configuration file is always read, even when
running with the -M option or with a MANPATH environment variable
that has neither a leading or trailing ":" nor any "::". If -M or
MA

Make sure that the configuration file is always read, even when
running with the -M option or with a MANPATH environment variable
that has neither a leading or trailing ":" nor any "::". If -M or
MANPATH override the configuration file rather than adding to it,
just ignore any "manpath" directives while processing the configuration
file.

This fixes a bug reported by Jan Stary <hans at stare dot cz>
on misc@.

show more ...


# 0d0f340d 27-Aug-2020 schwarze <schwarze@openbsd.org>

Fix a regression caused by the insertion of two new tokens,
which unintentionally made the -O tag= argument mandatory,
breaking commands like "man -akO tag Ic=ulimit".
Noticed while answering questio

Fix a regression caused by the insertion of two new tokens,
which unintentionally made the -O tag= argument mandatory,
breaking commands like "man -akO tag Ic=ulimit".
Noticed while answering questions from Ian Ropers.

show more ...


# 90f584c6 21-Jul-2020 schwarze <schwarze@openbsd.org>

undocumented options -O outfilename and -O tagfilename
to support regression testing without a tty;
no user visible change intended


# 6709a814 10-Feb-2020 schwarze <schwarze@openbsd.org>

Finally delete support for the "_whatdb" configuration directive,
which has a misleading syntax. It was declared obsolete and
superseded by the "manpath" directive five years ago.


# ecd1ed85 10-Jul-2019 schwarze <schwarze@openbsd.org>

Some time ago, i simplified mandoc_msg() such that it can be used
everywhere and not only in the parsers.
For more uniform messages, use it at more places instead of err(3),
in particular in the main

Some time ago, i simplified mandoc_msg() such that it can be used
everywhere and not only in the parsers.
For more uniform messages, use it at more places instead of err(3),
in particular in the main program.
While here, integrate a few trivial functions called at exactly one
place into the main option parser, and let a few more functions use
the normal convention of returning 0 for success and -1 for error.

show more ...


# bbfeca9f 03-May-2019 schwarze <schwarze@openbsd.org>

avoid duplicate "bad argument" error message, also shortening the code


# c229c1b8 03-May-2019 anton <anton@openbsd.org>

When processing unknown output options, prevent passing NULL to printf.

ok schwarze@


# d17f6067 22-Nov-2018 schwarze <schwarze@openbsd.org>

In -T locale (the default), -T ascii, and -T utf8 mode, provide a new
output option -O tag[=term] to move right to the definition of "term" when
opening the manual page in a pager, effectively portin

In -T locale (the default), -T ascii, and -T utf8 mode, provide a new
output option -O tag[=term] to move right to the definition of "term" when
opening the manual page in a pager, effectively porting the -T html
fragment name feature - https://man.openbsd.org/ksh#ulimit - to the
terminal. Try:

$ man -O tag uvm_sysctl
$ man -O tag=ulimit ksh
$ man -O tag 3 compress

Feature development triggered by a question from kn@. Klemens also
tested, provided feedback that resulted in improvements, and provided
an OK.

show more ...


# 3327fa00 02-Oct-2018 schwarze <schwarze@openbsd.org>

Add an option -T html -O toc to add a brief table of contents near
the top of HTML pages containing at least two non-standard sections.
Suggested by Adam Kalisz and discussed with kristaps@ during Eu

Add an option -T html -O toc to add a brief table of contents near
the top of HTML pages containing at least two non-standard sections.
Suggested by Adam Kalisz and discussed with kristaps@ during EuroBSDCon 2018.

show more ...


# 19b6bef7 01-Jul-2017 schwarze <schwarze@openbsd.org>

Basic reporting of .Xrs to manual pages that don't exist
in the base system, inspired by mdoclint(1).

We are able to do this because (1) the -mdoc parser, the -Tlint validator,
and the man(1) manual

Basic reporting of .Xrs to manual pages that don't exist
in the base system, inspired by mdoclint(1).

We are able to do this because (1) the -mdoc parser, the -Tlint validator,
and the man(1) manual page lookup code are all in the same program
and (2) the mandoc.db(5) database format allows fast lookup.

Feedback from, previous versions tested by, and OK jmc@.

A few features will be added to this in the tree, step by step.

show more ...


# 3d83c79f 13-Jun-2017 schwarze <schwarze@openbsd.org>

Delete the arbitrary range restriction for -Owidth.
We provide users with tools. We don't attempt to prevent them from
using them in stupid ways: depending on the context, not every
stupid-looking u

Delete the arbitrary range restriction for -Owidth.
We provide users with tools. We don't attempt to prevent them from
using them in stupid ways: depending on the context, not every
stupid-looking use is necessarily actually stupid, and not every
stupidity can be automatically detected anyway, so don't even try.

show more ...


# 385121c9 10-Feb-2017 schwarze <schwarze@openbsd.org>

In -Ttree output mode, show the BROKEN node flag and
provide a -Onoval output option to show the unvalidated tree.


# 4b502eb4 27-Jan-2017 schwarze <schwarze@openbsd.org>

warn about invalid output options
and error out if they occur on the command line;
missing feature found in the TODO file


# eff00e48 23-May-2016 millert <millert@openbsd.org>

Trim trailing whitespace from man.conf lines. OK schwarze@.


# 31f93c25 07-Nov-2015 schwarze <schwarze@openbsd.org>

Modernization, no functional change intended:
Use the POSIX function getline(3) rather than the slightly
dangerous BSD function fgetln(3).


# eba1598b 11-Oct-2015 schwarze <schwarze@openbsd.org>

Finally use __progname, err(3) and warn(3).
That's more readable and less error-prone than fumbling around
with argv[0], fprintf(3), strerror(3), perror(3), and exit(3).
It also shortens the code by

Finally use __progname, err(3) and warn(3).
That's more readable and less error-prone than fumbling around
with argv[0], fprintf(3), strerror(3), perror(3), and exit(3).
It also shortens the code by 50 lines.

It's a bad idea to boycott good interfaces merely because standards
committees ignore them. Instead, it's the job of the portable
distribution to provide compatibility modules for archaic systems
(like commercial Solaris) that still don't have them. Actually,
the compat code for the portable distribution already exists and
will be committed right after this.

show more ...


# ef3112a4 07-May-2015 schwarze <schwarze@openbsd.org>

Do not let the -m option or MANPATH with leading, trailing, or double
colon override the default manpath, let them add to the default manpath.
Only override the default manpath by the -M option, by M

Do not let the -m option or MANPATH with leading, trailing, or double
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@.

show more ...


# 4de77dec 27-Mar-2015 schwarze <schwarze@openbsd.org>

Parse the new man.conf(5) "output" directive.
The next step will be to actually use the parsed data.


# d05e3f9e 26-Mar-2015 schwarze <schwarze@openbsd.org>

Add a new directive "manpath path"
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 d

Add a new directive "manpath path"
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.

show more ...


# 263f9f36 21-Mar-2015 schwarze <schwarze@openbsd.org>

when there is no -m, no -M, no MANPATH and no /etc/man.conf,
fall back to /usr/share/man:/usr/X11R6/man:/usr/local/man


# a2e5c5f4 18-Nov-2014 schwarze <schwarze@openbsd.org>

Ignore invalid directories in man.conf(5) and MANPATH, even if their
parent directories exist, but complain about invalid directories
given on the command line.
Intended to fix an oddity reported by

Ignore invalid directories in man.conf(5) and MANPATH, even if their
parent directories exist, but complain about invalid directories
given on the command line.
Intended to fix an oddity reported by sthen@.

show more ...


# 8286bf36 23-Apr-2014 schwarze <schwarze@openbsd.org>

Audit malloc(3)/calloc(3)/realloc(3) usage.
* Change eight reallocs to reallocarray to be safe from overflows.
* Change one malloc to reallocarray to be safe from overflows.
* Change one calloc to re

Audit malloc(3)/calloc(3)/realloc(3) usage.
* 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).

show more ...


# 49aff9f8 20-Apr-2014 schwarze <schwarze@openbsd.org>

KNF: case (FOO): -> case FOO, remove /* LINTED */ and /* ARGSUSED */,
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change


# 4f4f7972 21-Mar-2014 schwarze <schwarze@openbsd.org>

The files mandoc.c and mandoc.h contained both specialised low-level
functions used for multiple languages (mdoc, man, roff), for example
mandoc_escape(), mandoc_getarg(), mandoc_eos(), and generic a

The files mandoc.c and mandoc.h contained both specialised low-level
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.

show more ...


# da448cac 21-Nov-2013 schwarze <schwarze@openbsd.org>

My audit of mandoc revealed two missing (unsigned char) casts
in isspace() and tolower() arguments containing arbitrary char data.
Thanks to deraadt@ for triggering the audit.


12