diff options
author | 2015-09-14 15:35:47 +0000 | |
---|---|---|
committer | 2015-09-14 15:35:47 +0000 | |
commit | 9c0d28f8dc36e16a8b49a0e5707da7c31ab30379 (patch) | |
tree | 7f2a440fff8728d0c4255c84de422ad84303fec6 /usr.bin/mandoc/mdoc_validate.c | |
parent | Remove useless quoting from .Fo and .Fn function names, to prevent (diff) | |
download | wireguard-openbsd-9c0d28f8dc36e16a8b49a0e5707da7c31ab30379.tar.xz wireguard-openbsd-9c0d28f8dc36e16a8b49a0e5707da7c31ab30379.zip |
Remove the warning about children of .Vt blocks because actually,
.Vt type global_variable No = Dv defined_constant ;
is the best way to specify in the SYNOPSIS how a global variable
is initialized in the rare case where that matters.
Issue noticed by jmc@.
Diffstat (limited to 'usr.bin/mandoc/mdoc_validate.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 0c664f672ea..543b5d7ef98 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_validate.c,v 1.207 2015/04/23 16:17:04 schwarze Exp $ */ +/* $OpenBSD: mdoc_validate.c,v 1.208 2015/09/14 15:35:47 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -105,7 +105,6 @@ static void post_sh_see_also(POST_ARGS); static void post_sh_authors(POST_ARGS); static void post_sm(POST_ARGS); static void post_st(POST_ARGS); -static void post_vt(POST_ARGS); static void pre_an(PRE_ARGS); static void pre_bd(PRE_ARGS); @@ -159,7 +158,7 @@ static const struct valids mdoc_valids[MDOC_MAX] = { { pre_std, NULL }, /* Rv */ { NULL, post_st }, /* St */ { NULL, NULL }, /* Va */ - { NULL, post_vt }, /* Vt */ + { NULL, NULL }, /* Vt */ { NULL, NULL }, /* Xr */ { NULL, NULL }, /* %A */ { NULL, post_hyph }, /* %B */ /* FIXME: can be used outside Rs/Re. */ @@ -924,28 +923,6 @@ post_fa(POST_ARGS) } static void -post_vt(POST_ARGS) -{ - const struct roff_node *n; - - /* - * The Vt macro comes in both ELEM and BLOCK form, both of which - * have different syntaxes (yet more context-sensitive - * behaviour). ELEM types must have a child, which is already - * guaranteed by the in_line parsing routine; BLOCK types, - * specifically the BODY, should only have TEXT children. - */ - - if (mdoc->last->type != ROFFT_BODY) - return; - - for (n = mdoc->last->child; n; n = n->next) - if (n->type != ROFFT_TEXT) - mandoc_msg(MANDOCERR_VT_CHILD, mdoc->parse, - n->line, n->pos, mdoc_macronames[n->tok]); -} - -static void post_nm(POST_ARGS) { struct roff_node *n; |