* mdocml: Back out stripping of non-predef and non-special escape
@ 2011-05-02 13:56 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-05-02 13:56 UTC (permalink / raw)
To: source
Log Message:
-----------
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).
Modified Files:
--------------
mdocml:
mandoc-db.c
Revision Data
-------------
Index: mandoc-db.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc-db.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lmandoc-db.c -Lmandoc-db.c -u -p -r1.14 -r1.15
--- mandoc-db.c
+++ 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
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
cp = endp;
}
+#endif
- memcpy(dstp, cp, sz);
+ memcpy(key->data + (int)key->size, cp, sz);
key->size += sz;
}
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-02 13:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02 13:56 mdocml: Back out stripping of non-predef and non-special escape kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).