discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: discuss@mdocml.bsd.lv
Cc: Nicolas Joly <njoly@pasteur.fr>
Subject: Re: warn about unknown volume/arch in .Dt macro arguments
Date: Fri, 16 Nov 2012 23:23:22 +0100	[thread overview]
Message-ID: <20121116222322.GD18695@iris.usta.de> (raw)
In-Reply-To: <20121013132308.GA20582@lynche.sis.pasteur.fr>

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

      reply	other threads:[~2012-11-16 22:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-13 13:23 Nicolas Joly
2012-11-16 22:23 ` Ingo Schwarze [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121116222322.GD18695@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=discuss@mdocml.bsd.lv \
    --cc=njoly@pasteur.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).