summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-05-02 13:56:13 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-05-02 13:56:13 +0000
commit06b3add3ba2e81181f5cb743d4f7d866b0747321 (patch)
treee203b038e26036b74b9f1df811936d4144c3f94e
parent4f1d76a0790dfdd1c6b6d7a883708a94a5a10676 (diff)
downloadmandoc-06b3add3ba2e81181f5cb743d4f7d866b0747321.tar.gz
Back out stripping of non-predef and non-special escape sequences from
input (this is not yet possible with mandoc_escape(), which depends on nil-terminated strings).
-rw-r--r--mandoc-db.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mandoc-db.c b/mandoc-db.c
index cb84d91b..db8b5790 100644
--- a/mandoc-db.c
+++ b/mandoc-db.c
@@ -443,9 +443,6 @@ dbt_init(DBT *key, size_t *ksz)
static void
dbt_appendb(DBT *key, size_t *ksz, const void *cp, size_t sz)
{
- void *dstp, *endp;
- int ssz;
- enum mandoc_esc esc;
assert(key->data);
@@ -456,6 +453,7 @@ dbt_appendb(DBT *key, size_t *ksz, const void *cp, size_t sz)
key->data = mandoc_realloc(key->data, *ksz);
}
+#if 0
dstp = key->data + (int)key->size;
while (NULL != (endp = memchr(cp, '\\', sz))) {
@@ -495,8 +493,9 @@ dbt_appendb(DBT *key, size_t *ksz, const void *cp, size_t sz)
cp = endp;
}
+#endif
- memcpy(dstp, cp, sz);
+ memcpy(key->data + (int)key->size, cp, sz);
key->size += sz;
}