version 1.269, 2018/08/17 20:33:37 |
version 1.271, 2018/12/14 05:18:02 |
Line 155 mdoc_elem_alloc(struct roff_man *mdoc, int line, int p |
|
Line 155 mdoc_elem_alloc(struct roff_man *mdoc, int line, int p |
|
mdoc->next = ROFF_NEXT_CHILD; |
mdoc->next = ROFF_NEXT_CHILD; |
} |
} |
|
|
void |
|
mdoc_node_relink(struct roff_man *mdoc, struct roff_node *p) |
|
{ |
|
|
|
roff_node_unlink(mdoc, p); |
|
p->prev = p->next = NULL; |
|
roff_node_append(mdoc, p); |
|
} |
|
|
|
/* |
/* |
* Parse free-form text, that is, a line that does not begin with the |
* Parse free-form text, that is, a line that does not begin with the |
* control character. |
* control character. |
Line 236 mdoc_ptext(struct roff_man *mdoc, int line, char *buf, |
|
Line 227 mdoc_ptext(struct roff_man *mdoc, int line, char *buf, |
|
*end = '\0'; |
*end = '\0'; |
|
|
if (ws) |
if (ws) |
mandoc_msg(MANDOCERR_SPACE_EOL, mdoc->parse, |
mandoc_msg(MANDOCERR_SPACE_EOL, line, (int)(ws - buf), NULL); |
line, (int)(ws-buf), NULL); |
|
|
|
/* |
/* |
* Blank lines are allowed in no-fill mode |
* Blank lines are allowed in no-fill mode |
Line 261 mdoc_ptext(struct roff_man *mdoc, int line, char *buf, |
|
Line 251 mdoc_ptext(struct roff_man *mdoc, int line, char *buf, |
|
default: |
default: |
break; |
break; |
} |
} |
mandoc_msg(MANDOCERR_FI_BLANK, mdoc->parse, |
mandoc_msg(MANDOCERR_FI_BLANK, line, (int)(c - buf), NULL); |
line, (int)(c - buf), NULL); |
|
roff_elem_alloc(mdoc, line, offs, ROFF_sp); |
roff_elem_alloc(mdoc, line, offs, ROFF_sp); |
mdoc->last->flags |= NODE_VALID | NODE_ENDED; |
mdoc->last->flags |= NODE_VALID | NODE_ENDED; |
mdoc->next = ROFF_NEXT_SIBLING; |
mdoc->next = ROFF_NEXT_SIBLING; |
Line 302 mdoc_ptext(struct roff_man *mdoc, int line, char *buf, |
|
Line 291 mdoc_ptext(struct roff_man *mdoc, int line, char *buf, |
|
if (*c == ' ') |
if (*c == ' ') |
c++; |
c++; |
if (isupper((unsigned char)(*c))) |
if (isupper((unsigned char)(*c))) |
mandoc_msg(MANDOCERR_EOS, mdoc->parse, |
mandoc_msg(MANDOCERR_EOS, line, (int)(c - buf), NULL); |
line, (int)(c - buf), NULL); |
|
} |
} |
|
|
return 1; |
return 1; |
Line 331 mdoc_pmacro(struct roff_man *mdoc, int ln, char *buf, |
|
Line 319 mdoc_pmacro(struct roff_man *mdoc, int ln, char *buf, |
|
if (sz == 2 || sz == 3) |
if (sz == 2 || sz == 3) |
tok = roffhash_find(mdoc->mdocmac, buf + sv, sz); |
tok = roffhash_find(mdoc->mdocmac, buf + sv, sz); |
if (tok == TOKEN_NONE) { |
if (tok == TOKEN_NONE) { |
mandoc_msg(MANDOCERR_MACRO, mdoc->parse, |
mandoc_msg(MANDOCERR_MACRO, ln, sv, "%s", buf + sv - 1); |
ln, sv, buf + sv - 1); |
|
return 1; |
return 1; |
} |
} |
|
|
Line 362 mdoc_pmacro(struct roff_man *mdoc, int ln, char *buf, |
|
Line 349 mdoc_pmacro(struct roff_man *mdoc, int ln, char *buf, |
|
*/ |
*/ |
|
|
if ('\0' == buf[offs] && ' ' == buf[offs - 1]) |
if ('\0' == buf[offs] && ' ' == buf[offs - 1]) |
mandoc_msg(MANDOCERR_SPACE_EOL, mdoc->parse, |
mandoc_msg(MANDOCERR_SPACE_EOL, ln, offs - 1, NULL); |
ln, offs - 1, NULL); |
|
|
|
/* |
/* |
* If an initial macro or a list invocation, divert directly |
* If an initial macro or a list invocation, divert directly |