version 1.162, 2014/08/19 17:28:57 |
version 1.163, 2014/09/07 00:04:47 |
|
|
/* $Id$ */ |
/* $OpenBSD$ */ |
/* |
/* |
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> |
|
|
mdoc->meta.os = mandoc_strdup(""); |
mdoc->meta.os = mandoc_strdup(""); |
} |
} |
|
|
n = mdoc->first; |
|
assert(n); |
|
|
|
/* Check that we begin with a proper `Sh'. */ |
/* Check that we begin with a proper `Sh'. */ |
|
|
if (NULL == n->child) |
n = mdoc->first->child; |
mandoc_msg(MANDOCERR_DOC_EMPTY, mdoc->parse, |
while (n != NULL && mdoc_macros[n->tok].flags & MDOC_PROLOGUE) |
n->line, n->pos, NULL); |
n = n->next; |
else if (MDOC_Sh != n->child->tok) |
|
|
if (n == NULL) |
|
mandoc_msg(MANDOCERR_DOC_EMPTY, mdoc->parse, 0, 0, NULL); |
|
else if (n->tok != MDOC_Sh) |
mandoc_msg(MANDOCERR_SEC_BEFORE, mdoc->parse, |
mandoc_msg(MANDOCERR_SEC_BEFORE, mdoc->parse, |
n->child->line, n->child->pos, |
n->line, n->pos, mdoc_macronames[n->tok]); |
mdoc_macronames[n->child->tok]); |
|
|
|
return(1); |
return(1); |
} |
} |