X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fwrbuf.c;h=2e8c4f73d63ae475b9683ac344aa8eec9802637c;hb=2dbe1df5facb92bac31b5da0ca2e2e8ee6f9b358;hp=09acce725edf7366dd4d0bff5e53c6ce14883cff;hpb=0efc47dc6d0080180038945a5f914749c3585799;p=yaz-moved-to-github.git diff --git a/src/wrbuf.c b/src/wrbuf.c index 09acce7..2e8c4f7 100644 --- a/src/wrbuf.c +++ b/src/wrbuf.c @@ -1,8 +1,8 @@ /* - * Copyright (C) 1995-2007, Index Data ApS + * Copyright (C) 1995-2008, Index Data ApS * See the file LICENSE for details. * - * $Id: wrbuf.c,v 1.21 2007-10-15 12:00:31 adam Exp $ + * $Id: wrbuf.c,v 1.23 2008-01-30 19:58:25 adam Exp $ */ /** @@ -213,6 +213,11 @@ int wrbuf_iconv_write_cdata(WRBUF b, yaz_iconv_t cd, const char *buf, int size) return wrbuf_iconv_write_x(b, cd, buf, size, 1); } +int wrbuf_iconv_puts_cdata(WRBUF b, yaz_iconv_t cd, const char *strz) +{ + return wrbuf_iconv_write_x(b, cd, strz, strlen(strz), 1); +} + void wrbuf_iconv_reset(WRBUF b, yaz_iconv_t cd) { if (cd) @@ -240,7 +245,12 @@ void wrbuf_cut_right(WRBUF b, size_t 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++)