projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Towards 3.0.24.
[yaz-moved-to-github.git]
/
src
/
wrbuf.c
diff --git
a/src/wrbuf.c
b/src/wrbuf.c
index
d8a709e
..
ce77914
100644
(file)
--- a/
src/wrbuf.c
+++ b/
src/wrbuf.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: wrbuf.c,v 1.20 2007-09-17 19:14:26 adam Exp $
+ * $Id: wrbuf.c,v 1.22 2007-11-15 08:45:52 adam Exp $
*/
/**
*/
/**
@@
-160,7
+160,7
@@
static int wrbuf_iconv_write_x(WRBUF b, yaz_iconv_t cd, const char *buf,
{
if (cd)
{
{
if (cd)
{
- char outbuf[12];
+ char outbuf[16];
size_t inbytesleft = size;
const char *inp = buf;
while (inbytesleft)
size_t inbytesleft = size;
const char *inp = buf;
while (inbytesleft)
@@
-217,7
+217,7
@@
void wrbuf_iconv_reset(WRBUF b, yaz_iconv_t cd)
{
if (cd)
{
{
if (cd)
{
- char outbuf[12];
+ char outbuf[16];
size_t outbytesleft = sizeof(outbuf);
char *outp = outbuf;
size_t r = yaz_iconv(cd, 0, 0, &outp, &outbytesleft);
size_t outbytesleft = sizeof(outbuf);
char *outp = outbuf;
size_t r = yaz_iconv(cd, 0, 0, &outp, &outbytesleft);
@@
-240,7
+240,12
@@
void wrbuf_cut_right(WRBUF b, size_t no_to_remove)
b->pos = b->pos - no_to_remove;
}
b->pos = b->pos - no_to_remove;
}
-void wrbuf_verbose_str(WRBUF b, const char *str, size_t len)
+void wrbuf_puts_escaped(WRBUF b, const char *str)
+{
+ return wrbuf_write_escaped(b, str, strlen(str));
+}
+
+void wrbuf_write_escaped(WRBUF b, const char *str, size_t len)
{
size_t i;
for (i = 0; i < len; i++)
{
size_t i;
for (i = 0; i < len; i++)