summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-01 16:38:57 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-01 16:38:57 +0000
commit0fc66c3bca377291b3baa0b377a5663fbfa65858 (patch)
treeed9dbcc654188aeb69fa00ad7d8a10309afe374c /mdoc.c
parent290ee584e6797390d16f3ef4c49a9dadcbda3001 (diff)
downloadmandoc-0fc66c3bca377291b3baa0b377a5663fbfa65858.tar.gz
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.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mdoc.c b/mdoc.c
index ba14919e..855eac96 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -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)