diff options
author | 2011-12-02 01:45:43 +0000 | |
---|---|---|
committer | 2011-12-02 01:45:43 +0000 | |
commit | 88ec69e32a860126a805492045ad4757fe05c2d4 (patch) | |
tree | 766169bd30b16ef759f8e953407fb0eceb3112a5 /usr.bin/mandoc/man_validate.c | |
parent | fix bz#1934: newer OpenSSL versions will require HMAC_CTX_Init before (diff) | |
download | wireguard-openbsd-88ec69e32a860126a805492045ad4757fe05c2d4.tar.xz wireguard-openbsd-88ec69e32a860126a805492045ad4757fe05c2d4.zip |
In man(7), when no explicit volume name is given, use the default
volume name for the respective manual section, just like in mdoc(7).
This gives us nicer page headers for cvs(1), lynx(1), tic(1),
mkhybrid(8), and many curses(3) manuals.
ok kristaps@
To not break compatibility, i wrote a corresponding patch for GNU troff
which Werner Lemberg accepted upstream at rev. 1.65 of:
http://cvs.savannah.gnu.org/viewvc/groff/tmac/an-old.tmac?root=groff
Diffstat (limited to 'usr.bin/mandoc/man_validate.c')
-rw-r--r-- | usr.bin/mandoc/man_validate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c index dcdb5e8cc8a..136e9cf110c 100644 --- a/usr.bin/mandoc/man_validate.c +++ b/usr.bin/mandoc/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.50 2011/11/05 16:02:18 schwarze Exp $ */ +/* $Id: man_validate.c,v 1.51 2011/12/02 01:45:43 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -409,9 +409,13 @@ post_TH(CHKARGS) m->meta.source = mandoc_strdup(n->string); /* TITLE MSEC DATE SOURCE ->VOL<- */ + /* If missing, use the default VOL name for MSEC. */ if (n && (n = n->next)) m->meta.vol = mandoc_strdup(n->string); + else if ('\0' != m->meta.msec[0] && + (NULL != (p = mandoc_a2msec(m->meta.msec)))) + m->meta.vol = mandoc_strdup(p); /* * Remove the `TH' node after we've processed it for our |