From 4973bccaa30cf310879f5190fb044cfc689289dc Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 1 Dec 2010 16:38:57 +0000 Subject: 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. --- mdoc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mdoc.c b/mdoc.c index 930d2071..b0f47e04 100644 --- a/mdoc.c +++ b/mdoc.c @@ -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 * Copyright (c) 2010 Ingo Schwarze @@ -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) -- cgit v1.2.3-56-ge451