version 1.355, 2018/03/16 15:05:44 |
version 1.359, 2018/08/01 13:46:15 |
Line 320 mdoc_node_validate(struct roff_man *mdoc) |
|
Line 320 mdoc_node_validate(struct roff_man *mdoc) |
|
(np->tok == MDOC_Sh || np->tok == MDOC_Ss))) |
(np->tok == MDOC_Sh || np->tok == MDOC_Ss))) |
check_toptext(mdoc, n->line, n->pos, n->string); |
check_toptext(mdoc, n->line, n->pos, n->string); |
break; |
break; |
|
case ROFFT_COMMENT: |
case ROFFT_EQN: |
case ROFFT_EQN: |
case ROFFT_TBL: |
case ROFFT_TBL: |
break; |
break; |
Line 412 check_text_em(struct roff_man *mdoc, int ln, int pos, |
|
Line 413 check_text_em(struct roff_man *mdoc, int ln, int pos, |
|
/* Look for em-dashes wrongly encoded as "--". */ |
/* Look for em-dashes wrongly encoded as "--". */ |
|
|
for (cp = p; *cp != '\0'; cp++) { |
for (cp = p; *cp != '\0'; cp++) { |
if (*cp != '-' || *++cp != '-') |
if (cp[0] != '-' || cp[1] != '-') |
continue; |
continue; |
|
cp++; |
|
|
/* Skip input sequences of more than two '-'. */ |
/* Skip input sequences of more than two '-'. */ |
|
|
Line 438 check_text_em(struct roff_man *mdoc, int ln, int pos, |
|
Line 440 check_text_em(struct roff_man *mdoc, int ln, int pos, |
|
np->string != '\0' && |
np->string != '\0' && |
isalpha((unsigned char)np->string[ |
isalpha((unsigned char)np->string[ |
strlen(np->string) - 1])) || |
strlen(np->string) - 1])) || |
(cp[2] != '\0' ? |
(cp[1] != '\0' && cp[2] != '\0' ? |
isalpha((unsigned char)cp[2]) : |
isalpha((unsigned char)cp[2]) : |
nn != NULL && |
nn != NULL && |
nn->type == ROFFT_TEXT && |
nn->type == ROFFT_TEXT && |
Line 1003 post_lb(POST_ARGS) |
|
Line 1005 post_lb(POST_ARGS) |
|
|
|
roff_word_alloc(mdoc, n->line, n->pos, "library"); |
roff_word_alloc(mdoc, n->line, n->pos, "library"); |
mdoc->last->flags = NODE_NOSRC; |
mdoc->last->flags = NODE_NOSRC; |
roff_word_alloc(mdoc, n->line, n->pos, "\\(Lq"); |
roff_word_alloc(mdoc, n->line, n->pos, "\\(lq"); |
mdoc->last->flags = NODE_DELIMO | NODE_NOSRC; |
mdoc->last->flags = NODE_DELIMO | NODE_NOSRC; |
mdoc->last = mdoc->last->next; |
mdoc->last = mdoc->last->next; |
roff_word_alloc(mdoc, n->line, n->pos, "\\(Rq"); |
roff_word_alloc(mdoc, n->line, n->pos, "\\(rq"); |
mdoc->last->flags = NODE_DELIMC | NODE_NOSRC; |
mdoc->last->flags = NODE_DELIMC | NODE_NOSRC; |
mdoc->last = n; |
mdoc->last = n; |
} |
} |
Line 1987 post_root(POST_ARGS) |
|
Line 1989 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 >= MDOC_Dd && |
while (n != NULL && |
mdoc_macros[n->tok].flags & MDOC_PROLOGUE) |
(n->type == ROFFT_COMMENT || |
|
(n->tok >= MDOC_Dd && |
|
mdoc_macros[n->tok].flags & MDOC_PROLOGUE))) |
n = n->next; |
n = n->next; |
|
|
if (n == NULL) |
if (n == NULL) |