From 06b3add3ba2e81181f5cb743d4f7d866b0747321 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 2 May 2011 13:56:13 +0000 Subject: 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). --- mandoc-db.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mandoc-db.c') 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; } -- cgit