| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
which unintentionally made the -O tag= argument mandatory,
breaking commands like "man -akO tag Ic=ulimit".
Noticed while answering questions from Ian Ropers.
|
|
|
|
|
| |
to support regression testing without a tty;
no user visible change intended
|
|
|
|
|
| |
which has a misleading syntax. It was declared obsolete and
superseded by the "manpath" directive five years ago.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
patch from anton@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
the top of HTML pages containing at least two non-standard sections.
Suggested by Adam Kalisz and discussed with kristaps@ during EuroBSDCon 2018.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
provide a -Onoval output option to show the unvalidated tree.
|
|
|
|
|
| |
and error out if they occur on the command line;
missing feature found in the TODO file
|
|
|
|
|
|
|
|
| |
delete manpath(1) support. With the mandoc-based man(1), manpath(1)
is utterly useless. Just set MANPATH_DEFAULT in configure.local
for sane operating system defaults, use man.conf(5) for machine-
specific modifications, and use ${MANPATH}, -m, and -M for user
preferences.
|
| |
|
|
|
|
|
|
| |
Use the POSIX function getline(3) rather than the slightly
dangerous BSD function fgetln(3).
Remove the related compatibility code.
|
|
|
|
|
| |
In that case, the required prototypes are in "config.h".
Patch from Peter Bray <pdb_ml at yahoo dot com dot au>.
|
|
|
|
|
|
|
|
|
|
| |
That's more readable and less error-prone than fumbling around
with argv[0], fprintf(3), strerror(3), perror(3), and exit(3).
It's a bad idea to boycott good interfaces merely because standards
committees ignore them. Instead, let's provide compatibility modules
for archaic systems (like commercial Solaris) that still don't have
them. The compat module has an UCB Copyright (c) 1993...
|
|
|
|
| |
Issue found on Debian by Markus <Waldeck at gmx dot de>.
|
|
|
|
|
|
|
|
|
| |
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@.
|
|
|
|
| |
Patch from Steffen Nurpmeso <sdaoden at yandex dot com>, thanks.
|
|
|
|
| |
The next step will be to actually use the parsed data.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
fall back to /usr/share/man:/usr/X11R6/man:/usr/local/man
|
| |
|
|
|
|
|
|
| |
parent directories exist, but complain about invalid directories
given on the command line.
Intended to fix an oddity reported by sthen@.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* 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).
|
|
|
|
|
| |
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
in an isspace() argument containing arbitrary char data.
Thanks to deraadt@ for triggering the audit.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This also cleans up the code a little bit. While here, make some functions
static that are only used within manpath.c.
|
|
|
|
|
| |
including various tweaks to the whatis(8) manual;
ok kristaps@
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
| |
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.
|
|
Most of this code (except the manpath part) written by schwarze@.
This isn't hooked into anything yet.
|