version 1.350, 2017/07/20 12:54:02 |
version 1.354, 2018/02/06 16:29:57 |
Line 169 static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] |
|
Line 169 static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] |
|
post_hyph, /* %T */ /* FIXME: can be used outside Rs/Re. */ |
post_hyph, /* %T */ /* FIXME: can be used outside Rs/Re. */ |
NULL, /* %V */ |
NULL, /* %V */ |
NULL, /* Ac */ |
NULL, /* Ac */ |
post_delim_nb, /* Ao */ |
NULL, /* Ao */ |
post_delim_nb, /* Aq */ |
post_delim_nb, /* Aq */ |
post_at, /* At */ |
post_at, /* At */ |
NULL, /* Bc */ |
NULL, /* Bc */ |
post_bf, /* Bf */ |
post_bf, /* Bf */ |
post_delim_nb, /* Bo */ |
NULL, /* Bo */ |
NULL, /* Bq */ |
NULL, /* Bq */ |
post_xx, /* Bsx */ |
post_xx, /* Bsx */ |
post_bx, /* Bx */ |
post_bx, /* Bx */ |
Line 194 static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] |
|
Line 194 static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] |
|
post_xx, /* Ox */ |
post_xx, /* Ox */ |
NULL, /* Pc */ |
NULL, /* Pc */ |
NULL, /* Pf */ |
NULL, /* Pf */ |
post_delim_nb, /* Po */ |
NULL, /* Po */ |
post_delim_nb, /* Pq */ |
post_delim_nb, /* Pq */ |
NULL, /* Qc */ |
NULL, /* Qc */ |
post_delim_nb, /* Ql */ |
post_delim_nb, /* Ql */ |
post_delim_nb, /* Qo */ |
NULL, /* Qo */ |
post_delim_nb, /* Qq */ |
post_delim_nb, /* Qq */ |
NULL, /* Re */ |
NULL, /* Re */ |
post_rs, /* Rs */ |
post_rs, /* Rs */ |
NULL, /* Sc */ |
NULL, /* Sc */ |
post_delim_nb, /* So */ |
NULL, /* So */ |
post_delim_nb, /* Sq */ |
post_delim_nb, /* Sq */ |
post_sm, /* Sm */ |
post_sm, /* Sm */ |
post_sx, /* Sx */ |
post_sx, /* Sx */ |
Line 214 static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] |
|
Line 214 static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] |
|
NULL, /* Xo */ |
NULL, /* Xo */ |
post_fo, /* Fo */ |
post_fo, /* Fo */ |
NULL, /* Fc */ |
NULL, /* Fc */ |
post_delim_nb, /* Oo */ |
NULL, /* Oo */ |
NULL, /* Oc */ |
NULL, /* Oc */ |
post_bk, /* Bk */ |
post_bk, /* Bk */ |
NULL, /* Ek */ |
NULL, /* Ek */ |
Line 227 static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] |
|
Line 227 static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] |
|
post_delim_nb, /* Lk */ |
post_delim_nb, /* Lk */ |
post_defaults, /* Mt */ |
post_defaults, /* Mt */ |
post_delim_nb, /* Brq */ |
post_delim_nb, /* Brq */ |
post_delim_nb, /* Bro */ |
NULL, /* Bro */ |
NULL, /* Brc */ |
NULL, /* Brc */ |
NULL, /* %C */ |
NULL, /* %C */ |
post_es, /* Es */ |
post_es, /* Es */ |
Line 530 post_delim_nb(POST_ARGS) |
|
Line 530 post_delim_nb(POST_ARGS) |
|
|
|
/* At least three alphabetic words with a sentence ending. */ |
/* At least three alphabetic words with a sentence ending. */ |
if (strchr("!.:?", *lc) != NULL && (tok == MDOC_Em || |
if (strchr("!.:?", *lc) != NULL && (tok == MDOC_Em || |
tok == MDOC_Li || tok == MDOC_Po || tok == MDOC_Pq || |
tok == MDOC_Li || tok == MDOC_Pq || tok == MDOC_Sy)) { |
tok == MDOC_Sy)) { |
|
nw = 0; |
nw = 0; |
for (cp = lc - 1; cp >= nch->string; cp--) { |
for (cp = lc - 1; cp >= nch->string; cp--) { |
if (*cp == ' ') { |
if (*cp == ' ') { |
Line 1137 post_fname(POST_ARGS) |
|
Line 1136 post_fname(POST_ARGS) |
|
if ( ! (cp[0] == '\0' || (cp[0] == '(' && cp[1] == '*'))) |
if ( ! (cp[0] == '\0' || (cp[0] == '(' && cp[1] == '*'))) |
mandoc_msg(MANDOCERR_FN_PAREN, mdoc->parse, |
mandoc_msg(MANDOCERR_FN_PAREN, mdoc->parse, |
n->line, n->pos + pos, n->string); |
n->line, n->pos + pos, n->string); |
if (n->sec == SEC_SYNOPSIS && mdoc->meta.msec != NULL) |
|
mandoc_xr_add(mdoc->meta.msec, n->string, -1, -1); |
|
} |
} |
|
|
static void |
static void |
Line 1205 post_nm(POST_ARGS) |
|
Line 1202 post_nm(POST_ARGS) |
|
|
|
n = mdoc->last; |
n = mdoc->last; |
|
|
if ((n->sec == SEC_NAME || n->sec == SEC_SYNOPSIS) && |
if (n->sec == SEC_NAME && n->child != NULL && |
n->child != NULL && n->child->type == ROFFT_TEXT && |
n->child->type == ROFFT_TEXT && mdoc->meta.msec != NULL) |
mdoc->meta.msec != NULL) |
|
mandoc_xr_add(mdoc->meta.msec, n->child->string, -1, -1); |
mandoc_xr_add(mdoc->meta.msec, n->child->string, -1, -1); |
|
|
if (n->last != NULL && |
if (n->last != NULL && |
Line 1917 post_root(POST_ARGS) |
|
Line 1913 post_root(POST_ARGS) |
|
arch++; |
arch++; |
if (*arch == NULL) { |
if (*arch == NULL) { |
n = mdoc->first->child; |
n = mdoc->first->child; |
while (n->tok != MDOC_Dt) |
while (n->tok != MDOC_Dt || |
|
n->child == NULL || |
|
n->child->next == NULL || |
|
n->child->next->next == NULL) |
n = n->next; |
n = n->next; |
n = n->child->next->next; |
n = n->child->next->next; |
mandoc_vmsg(MANDOCERR_ARCH_BAD, |
mandoc_vmsg(MANDOCERR_ARCH_BAD, |
Line 1931 post_root(POST_ARGS) |
|
Line 1930 post_root(POST_ARGS) |
|
/* Check that we begin with a proper `Sh'. */ |
/* Check that we begin with a proper `Sh'. */ |
|
|
n = mdoc->first->child; |
n = mdoc->first->child; |
while (n != NULL && n->tok != TOKEN_NONE && |
while (n != NULL && n->tok >= MDOC_Dd && |
mdoc_macros[n->tok].flags & MDOC_PROLOGUE) |
mdoc_macros[n->tok].flags & MDOC_PROLOGUE) |
n = n->next; |
n = n->next; |
|
|