summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-08-19 11:58:32 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-08-19 11:58:32 +0000
commit2947204975cad02e98da760b1aa5d9e0efc196d0 (patch)
treed00a1130c63c043652f235e87a2741cb87bc26e3 /mdoc.c
parenta7d939f1559a215346a02772817702f1fd397a31 (diff)
downloadmandoc-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.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/mdoc.c b/mdoc.c
index f9ae1ede..b09dfa30 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -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. */ ;