From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout.scc.kit.edu (mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id qAGMNNNU008689 for ; Fri, 16 Nov 2012 17:23:24 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1TZUJm-00041z-9q; Fri, 16 Nov 2012 23:23:22 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1TZUJn-0004Xr-1n; Fri, 16 Nov 2012 23:23:23 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1TZUJn-0000Mo-0Q; Fri, 16 Nov 2012 23:23:23 +0100 Received: from schwarze by usta.de with local (Exim 4.77) (envelope-from ) id 1TZUJm-0003f1-Vt; Fri, 16 Nov 2012 23:23:22 +0100 Date: Fri, 16 Nov 2012 23:23:22 +0100 From: Ingo Schwarze To: discuss@mdocml.bsd.lv Cc: Nicolas Joly Subject: Re: warn about unknown volume/arch in .Dt macro arguments Message-ID: <20121116222322.GD18695@iris.usta.de> References: <20121013132308.GA20582@lynche.sis.pasteur.fr> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121013132308.GA20582@lynche.sis.pasteur.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Nicolas, Nicolas Joly wrote on Sat, Oct 13, 2012 at 03:23:08PM +0200: > Please find attached a small patch that i have for quite some time in > my local NetBSD tree that makes mandoc warn about unknown volume/arch > in Dt macro arguments. I just committed this to both the OpenBSD and bsd.lv trees. Thanks for the patch and sorry for the delay! Greetings from Coimbra, Ingo > Index: external/bsd/mdocml/dist/mandoc.h > =================================================================== > RCS file: /cvsroot/src/external/bsd/mdocml/dist/mandoc.h,v > retrieving revision 1.2 > diff -u -p -r1.2 mandoc.h > --- external/bsd/mdocml/dist/mandoc.h 16 Feb 2012 20:58:23 -0000 1.2 > +++ external/bsd/mdocml/dist/mandoc.h 13 Oct 2012 13:19:12 -0000 > @@ -50,6 +50,7 @@ enum mandocerr { > MANDOCERR_NOTITLE, /* no title in document */ > MANDOCERR_UPPERCASE, /* document title should be all caps */ > MANDOCERR_BADMSEC, /* unknown manual section */ > + MANDOCERR_BADVOLARCH, /* unknown manual volume/arch */ > MANDOCERR_NODATE, /* date missing, using today's date */ > MANDOCERR_BADDATE, /* cannot parse date, using it verbatim */ > MANDOCERR_PROLOGOOO, /* prologue macros out of order */ > Index: external/bsd/mdocml/dist/mdoc_validate.c > =================================================================== > RCS file: /cvsroot/src/external/bsd/mdocml/dist/mdoc_validate.c,v > retrieving revision 1.4 > diff -u -p -r1.4 mdoc_validate.c > --- external/bsd/mdocml/dist/mdoc_validate.c 30 Jan 2012 17:03:01 -0000 1.4 > +++ external/bsd/mdocml/dist/mdoc_validate.c 13 Oct 2012 13:19:12 -0000 > @@ -2124,9 +2124,9 @@ post_dt(POST_ARGS) > free(mdoc->meta.vol); > mdoc->meta.vol = mandoc_strdup(cp); > } else { > - /* FIXME: warn about bad arch. */ > cp = mdoc_a2arch(nn->string); > if (NULL == cp) { > + mdoc_nmsg(mdoc, nn, MANDOCERR_BADVOLARCH); > free(mdoc->meta.vol); > mdoc->meta.vol = mandoc_strdup(nn->string); > } else > Index: external/bsd/mdocml/dist/read.c > =================================================================== > RCS file: /cvsroot/src/external/bsd/mdocml/dist/read.c,v > retrieving revision 1.6 > diff -u -p -r1.6 read.c > --- external/bsd/mdocml/dist/read.c 16 Feb 2012 20:58:23 -0000 1.6 > +++ external/bsd/mdocml/dist/read.c 13 Oct 2012 13:19:12 -0000 > @@ -94,6 +94,7 @@ static const char * const mandocerrs[MAN > "no title in document", > "document title should be all caps", > "unknown manual section", > + "unknown manual volume/arch", > "date missing, using today's date", > "cannot parse date, using it verbatim", > "prologue macros out of order", -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv