mandoc: break.in:41:2: WARNING: blocks badly nested: El breaks Bd
mandoc: break.in:42:2: ERROR: skipping item outside list: It
mandoc: break.in:49:2: WARNING: blocks badly nested: El breaks It
-mandoc: break.in:48:25: ERROR: appending missing end of block: Bo
-mandoc: break.in:47:2: ERROR: appending missing end of block: Bl
+mandoc: break.in:51:2: ERROR: inserting missing end of block: Sh breaks Bo
+mandoc: break.in:51:2: ERROR: inserting missing end of block: Sh breaks It
+mandoc: break.in:51:2: ERROR: inserting missing end of block: Sh breaks Bl
+mandoc: break.in:54:2: WARNING: blocks badly nested: El breaks It
+mandoc: break.in:53:25: ERROR: appending missing end of block: Bo
+mandoc: break.in:52:2: ERROR: appending missing end of block: Bl
+mandoc: break.in:53:2: WARNING: empty list item: Bl -enum It
+mandoc: break.in:53:2: ERROR: skipping all arguments: It before broken block
-/* $OpenBSD: mdoc_validate.c,v 1.179 2014/11/30 05:28:00 schwarze Exp $ */
+/* $OpenBSD: mdoc_validate.c,v 1.180 2014/12/18 19:22:47 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
struct mdoc_node *nbl, *nit, *nch;
nit = mdoc->last;
- if (MDOC_BLOCK != nit->type)
+ if (nit->type != MDOC_BLOCK)
return;
nbl = nit->parent->parent;
case LIST_inset:
/* FALLTHROUGH */
case LIST_diag:
- if (NULL == nit->head->child)
+ if (nit->head->child == NULL)
mandoc_vmsg(MANDOCERR_IT_NOHEAD,
mdoc->parse, nit->line, nit->pos,
"Bl -%s It",
case LIST_enum:
/* FALLTHROUGH */
case LIST_hyphen:
- if (NULL == nit->body->child)
+ if (nit->body == NULL || nit->body->child == NULL)
mandoc_vmsg(MANDOCERR_IT_NOBODY,
mdoc->parse, nit->line, nit->pos,
"Bl -%s It",
mdoc_argnames[nbl->args->argv[0].arg]);
/* FALLTHROUGH */
case LIST_item:
- if (NULL != nit->head->child)
+ if (nit->head->child != NULL)
mandoc_vmsg(MANDOCERR_ARG_SKIP,
mdoc->parse, nit->line, nit->pos,
"It %s", nit->head->child->string);
case LIST_column:
cols = (int)nbl->norm->Bl.ncols;
- assert(NULL == nit->head->child);
+ assert(nit->head->child == NULL);
for (i = 0, nch = nit->child; nch; nch = nch->next)
- if (MDOC_BODY == nch->type)
+ if (nch->type == MDOC_BODY)
i++;
if (i < cols || i > cols + 1)