diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-01 16:38:57 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-01 16:38:57 +0000 |
commit | 4973bccaa30cf310879f5190fb044cfc689289dc (patch) | |
tree | 8aa7202df54f01b12df0f68129a513bd252fff95 | |
parent | 0a046d18c4826bf5ad3f6c63da7f9469c43d26e1 (diff) | |
download | mandoc-4973bccaa30cf310879f5190fb044cfc689289dc.tar.gz mandoc-4973bccaa30cf310879f5190fb044cfc689289dc.tar.zst mandoc-4973bccaa30cf310879f5190fb044cfc689289dc.zip |
Make sure that the manual section defaults to `1' if it's unset. This
behaviour only happens if `Dt' isn't specified, which can be exhibited
by running mandoc -mdoc on a man manual.
-rw-r--r-- | mdoc.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.166 2010/11/30 13:04:14 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.167 2010/12/01 16:38:57 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -286,6 +286,8 @@ mdoc_macro(MACRO_PROT_ARGS) ! (MDOC_PBODY & m->flags)) { if ( ! mdoc_pmsg(m, line, ppos, MANDOCERR_BADPROLOG)) return(0); + if (NULL == m->meta.msec) + m->meta.msec = mandoc_strdup("1"); if (NULL == m->meta.title) m->meta.title = mandoc_strdup("UNKNOWN"); if (NULL == m->meta.vol) |