summaryrefslogtreecommitdiffstats
path: root/ml.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-12-05 19:45:15 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-12-05 19:45:15 +0000
commita615ddd77b9fc44ac7ffab361ab156b46fd896c6 (patch)
treed7775d886a82b7503c1d272925a27b896ddf43b4 /ml.c
parent57ed1544ce7edde6d0812e0c870f03e6b1e7204f (diff)
downloadmandoc-a615ddd77b9fc44ac7ffab361ab156b46fd896c6.tar.gz
*** empty log message ***
Diffstat (limited to 'ml.c')
-rw-r--r--ml.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ml.c b/ml.c
index 5822edd3..e3b8ed29 100644
--- a/ml.c
+++ b/ml.c
@@ -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);
}