diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-08-19 11:58:32 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-08-19 11:58:32 +0000 |
commit | 2947204975cad02e98da760b1aa5d9e0efc196d0 (patch) | |
tree | d00a1130c63c043652f235e87a2741cb87bc26e3 /mdoc.c | |
parent | a7d939f1559a215346a02772817702f1fd397a31 (diff) | |
download | mandoc-2947204975cad02e98da760b1aa5d9e0efc196d0.tar.gz |
Moved MDOC_NEXT_SIBLING into mdoc_word (libmdoc).
De-chunking of word terms in libman.
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -543,7 +543,10 @@ pstring(struct mdoc *m, int line, int pos, const char *p, size_t len) /* Prohibit truncation. */ assert(sv < len + 1); - return(node_append(m, n)); + if ( ! node_append(m, n)) + return(0); + m->next = MDOC_NEXT_SIBLING; + return(1); } @@ -600,12 +603,8 @@ parsetext(struct mdoc *m, int line, char *buf) * back-end, as it should be preserved as a single term. */ - if (MDOC_LITERAL & m->flags) { - if ( ! mdoc_word_alloc(m, line, 0, buf)) - return(0); - m->next = MDOC_NEXT_SIBLING; - return(1); - } + if (MDOC_LITERAL & m->flags) + return(mdoc_word_alloc(m, line, 0, buf)); /* Disallow blank/white-space lines in non-literal mode. */ @@ -630,7 +629,6 @@ parsetext(struct mdoc *m, int line, char *buf) buf[i++] = 0; if ( ! pstring(m, line, j, &buf[j], (size_t)(i - j))) return(0); - m->next = MDOC_NEXT_SIBLING; for ( ; ' ' == buf[i]; i++) /* Skip trailing whitespace. */ ; |