source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: If -column, -diag, -inset, -item, or -ohang lists have a -width,
@ 2017-07-15 16:40 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-07-15 16:40 UTC (permalink / raw)
  To: source

Log Message:
-----------
If -column, -diag, -inset, -item, or -ohang lists have a -width,
don't just talk about ignoring it, actually do ignore it.
No change for terminal output, improves HTML output.

Modified Files:
--------------
    mandoc:
        mdoc_validate.c

Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_validate.c,v
retrieving revision 1.348
retrieving revision 1.349
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.348 -r1.349
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -700,7 +700,7 @@ post_bl_norm(POST_ARGS)
 
 	switch (n->norm->Bl.type) {
 	case LIST_tag:
-		if (NULL == n->norm->Bl.width)
+		if (n->norm->Bl.width == NULL)
 			mandoc_msg(MANDOCERR_BL_NOWIDTH, mdoc->parse,
 			    n->line, n->pos, "Bl -tag");
 		break;
@@ -709,19 +709,20 @@ post_bl_norm(POST_ARGS)
 	case LIST_ohang:
 	case LIST_inset:
 	case LIST_item:
-		if (n->norm->Bl.width)
+		if (n->norm->Bl.width != NULL)
 			mandoc_vmsg(MANDOCERR_BL_SKIPW, mdoc->parse,
 			    wa->line, wa->pos, "Bl -%s",
 			    mdoc_argnames[mdoclt]);
+		n->norm->Bl.width = NULL;
 		break;
 	case LIST_bullet:
 	case LIST_dash:
 	case LIST_hyphen:
-		if (NULL == n->norm->Bl.width)
+		if (n->norm->Bl.width == NULL)
 			n->norm->Bl.width = "2n";
 		break;
 	case LIST_enum:
-		if (NULL == n->norm->Bl.width)
+		if (n->norm->Bl.width == NULL)
 			n->norm->Bl.width = "3n";
 		break;
 	default:
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-15 16:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-15 16:40 mandoc: If -column, -diag, -inset, -item, or -ohang lists have a -width, 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).