diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2008-12-05 19:45:15 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2008-12-05 19:45:15 +0000 |
commit | a615ddd77b9fc44ac7ffab361ab156b46fd896c6 (patch) | |
tree | d7775d886a82b7503c1d272925a27b896ddf43b4 /ml.c | |
parent | 57ed1544ce7edde6d0812e0c870f03e6b1e7204f (diff) | |
download | mandoc-a615ddd77b9fc44ac7ffab361ab156b46fd896c6.tar.gz |
*** empty log message ***
Diffstat (limited to 'ml.c')
-rw-r--r-- | ml.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -51,10 +51,8 @@ ml_nputstring(struct md_mbuf *p, /* Escaped value. */ case ('\\'): - if (-1 == (v = rofftok_scan(buf, &i))) { - /* TODO: error. */ + if (-1 == (v = rofftok_scan(buf, &i))) return(0); - } switch (v) { case (ROFFTok_Sp_A): @@ -178,8 +176,7 @@ ml_nputstring(struct md_mbuf *p, ssz = 0; break; default: - /* TODO: print error. */ - return(-1); + return(0); } break; @@ -230,7 +227,8 @@ ml_nputs(struct md_mbuf *p, const char *buf, size_t sz, size_t *pos) if ( ! md_buf_puts(p, buf, sz)) return(0); - *pos += sz; + if (pos) + *pos += sz; return(1); } @@ -245,7 +243,9 @@ ml_puts(struct md_mbuf *p, const char *buf, size_t *pos) if ( ! md_buf_puts(p, buf, sz)) return(0); - *pos += sz; + + if (pos) + *pos += sz; return(1); } |