diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-08-02 13:29:04 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-08-02 13:29:04 +0000 |
commit | abe8861b90656f18e88a40117353df6757674d7e (patch) | |
tree | c064c0c2261067278e68b5bbba25fad0842dd242 /mdoc_validate.c | |
parent | d41a68de8e563ec665662c6908538a9ca789db39 (diff) | |
download | mandoc-abe8861b90656f18e88a40117353df6757674d7e.tar.gz |
No longer use names that only occur in the SYNOPSIS section as names
for man(1) lookup. For OpenBSD base and Xenocara, that functionality
was never intended to be required, and i just fixed the last handful
of offenders using it - not counting the horribly ill-designed
interfaces engine(3) and lh_new(3) which are impossible to properly
document in the first place.
Of course, apropos(1) and whatis(1) continue to use SYNOPSIS .Nm,
.Fn, and .Fo macros, so "man -k ENGINE_get_load_privkey_function"
still works.
This change also gets rid of a few bogus warnings "cross reference
to self" which actually are *not* to self, like in yp(8).
This former functionality was intended to help third-party software
in the ports tree and on non-OpenBSD systems containing manual pages
with incomplete or corrupt NAME sections. But it turned out it did
more harm than good, and caused more confusion than relief,
specifically for third party manuals and for maintainers of
mandoc-portable on other operating systems. So kill it.
Problems reported, among others, by Yuri Pankov (illumos).
OK jmc@
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index a0137509..fe238eef 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1137,8 +1137,6 @@ post_fname(POST_ARGS) if ( ! (cp[0] == '\0' || (cp[0] == '(' && cp[1] == '*'))) mandoc_msg(MANDOCERR_FN_PAREN, mdoc->parse, n->line, n->pos + pos, n->string); - if (n->sec == SEC_SYNOPSIS && mdoc->meta.msec != NULL) - mandoc_xr_add(mdoc->meta.msec, n->string, -1, -1); } static void @@ -1205,9 +1203,8 @@ post_nm(POST_ARGS) n = mdoc->last; - if ((n->sec == SEC_NAME || n->sec == SEC_SYNOPSIS) && - n->child != NULL && n->child->type == ROFFT_TEXT && - mdoc->meta.msec != NULL) + if (n->sec == SEC_NAME && n->child != NULL && + n->child->type == ROFFT_TEXT && mdoc->meta.msec != NULL) mandoc_xr_add(mdoc->meta.msec, n->child->string, -1, -1); if (n->last != NULL && |