* mdocml: Remove the warning about children of .Vt blocks because
@ 2015-09-14 15:36 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-09-14 15:36 UTC (permalink / raw)
To: source
Log Message:
-----------
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@.
Modified Files:
--------------
mdocml:
mandoc.1
mandoc.h
mdoc_validate.c
read.c
Revision Data
-------------
Index: mandoc.h
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mandoc.h,v
retrieving revision 1.204
retrieving revision 1.205
diff -Lmandoc.h -Lmandoc.h -u -p -r1.204 -r1.205
--- mandoc.h
+++ mandoc.h
@@ -86,7 +86,6 @@ enum mandocerr {
MANDOCERR_BLK_NEST, /* blocks badly nested: macro ... */
MANDOCERR_BD_NEST, /* nested displays are not portable: macro ... */
MANDOCERR_BL_MOVE, /* moving content out of list: macro */
- MANDOCERR_VT_CHILD, /* .Vt block has child macro: macro */
MANDOCERR_FI_SKIP, /* fill mode already enabled, skipping: fi */
MANDOCERR_NF_SKIP, /* fill mode already disabled, skipping: nf */
MANDOCERR_BLK_LINE, /* line scope broken: macro breaks macro */
Index: mdoc_validate.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_validate.c,v
retrieving revision 1.291
retrieving revision 1.292
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.291 -r1.292
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -107,7 +107,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);
@@ -161,7 +160,7 @@ static const struct valids mdoc_valids[M
{ 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. */
@@ -930,28 +929,6 @@ post_fa(POST_ARGS)
break;
}
}
-}
-
-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
Index: mandoc.1
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mandoc.1,v
retrieving revision 1.159
retrieving revision 1.160
diff -Lmandoc.1 -Lmandoc.1 -u -p -r1.159 -r1.160
--- mandoc.1
+++ mandoc.1
@@ -934,13 +934,6 @@ list block contains text or macros befor
.Ic \&It
macro.
The offending children are moved before the beginning of the list.
-.It Sy ".Vt block has child macro"
-.Pq mdoc
-The
-.Ic \&Vt
-macro supports plain text arguments only.
-Formatting may be ugly and semantic searching
-for the affected content might not work.
.It Sy "fill mode already enabled, skipping"
.Pq man
A
Index: read.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/read.c,v
retrieving revision 1.140
retrieving revision 1.141
diff -Lread.c -Lread.c -u -p -r1.140 -r1.141
--- read.c
+++ read.c
@@ -129,7 +129,6 @@ static const char * const mandocerrs[MAN
"blocks badly nested",
"nested displays are not portable",
"moving content out of list",
- ".Vt block has child macro",
"fill mode already enabled, skipping",
"fill mode already disabled, skipping",
"line scope broken",
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-14 15:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-14 15:36 mdocml: Remove the warning about children of .Vt blocks because schwarze
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).