aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/man_validate.c b/man_validate.c
index ad8206b6..16d99635 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -1,7 +1,7 @@
/* $OpenBSD$ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010, 2012-2016 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -180,10 +180,10 @@ static void
post_OP(CHKARGS)
{
- if (n->nchild == 0)
+ if (n->child == NULL)
mandoc_msg(MANDOCERR_OP_EMPTY, man->parse,
n->line, n->pos, "OP");
- else if (n->nchild > 2) {
+ else if (n->child->next != NULL && n->child->next->next != NULL) {
n = n->child->next->next;
mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse,
n->line, n->pos, "OP ... %s", n->string);
@@ -206,7 +206,7 @@ post_ft(CHKARGS)
char *cp;
int ok;
- if (0 == n->nchild)
+ if (n->child == NULL)
return;
ok = 0;
@@ -256,22 +256,22 @@ check_par(CHKARGS)
switch (n->type) {
case ROFFT_BLOCK:
- if (0 == n->body->nchild)
+ if (n->body->child == NULL)
roff_node_delete(man, n);
break;
case ROFFT_BODY:
- if (0 == n->nchild)
+ if (n->child == NULL)
mandoc_vmsg(MANDOCERR_PAR_SKIP,
man->parse, n->line, n->pos,
"%s empty", man_macronames[n->tok]);
break;
case ROFFT_HEAD:
- if (n->nchild)
+ if (n->child != NULL)
mandoc_vmsg(MANDOCERR_ARG_SKIP,
man->parse, n->line, n->pos,
"%s %s%s", man_macronames[n->tok],
n->child->string,
- n->nchild > 1 ? " ..." : "");
+ n->child->next != NULL ? " ..." : "");
break;
default:
break;
@@ -284,11 +284,11 @@ post_IP(CHKARGS)
switch (n->type) {
case ROFFT_BLOCK:
- if (0 == n->head->nchild && 0 == n->body->nchild)
+ if (n->head->child == NULL && n->body->child == NULL)
roff_node_delete(man, n);
break;
case ROFFT_BODY:
- if (0 == n->parent->head->nchild && 0 == n->nchild)
+ if (n->parent->head->child == NULL && n->child == NULL)
mandoc_vmsg(MANDOCERR_PAR_SKIP,
man->parse, n->line, n->pos,
"%s empty", man_macronames[n->tok]);