X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fwrbuf.c;h=9322f9083846fc7f1c1d0bf4bf3956dcf9e85509;hb=4e3f7be8266559e07dc01ae5d6aba31d30b8bd44;hp=ce77914ed9c822baebe219919782f2415afebcde;hpb=0d6e26ddc9a74fb5668efb2a8c72d58a2f4ea770;p=yaz-moved-to-github.git diff --git a/src/wrbuf.c b/src/wrbuf.c index ce77914..9322f90 100644 --- a/src/wrbuf.c +++ b/src/wrbuf.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. - * - * $Id: wrbuf.c,v 1.22 2007-11-15 08:45:52 adam Exp $ */ /** @@ -80,6 +78,11 @@ int wrbuf_puts(WRBUF b, const char *buf) return 0; } +void wrbuf_vputs(const char *buf, void *client_data) +{ + wrbuf_write((WRBUF) client_data, buf, strlen(buf)); +} + int wrbuf_puts_replace_char(WRBUF b, const char *buf, const char from, const char to) { @@ -213,6 +216,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) @@ -242,7 +250,7 @@ void wrbuf_cut_right(WRBUF b, size_t no_to_remove) void wrbuf_puts_escaped(WRBUF b, const char *str) { - return wrbuf_write_escaped(b, str, strlen(str)); + wrbuf_write_escaped(b, str, strlen(str)); } void wrbuf_write_escaped(WRBUF b, const char *str, size_t len) @@ -258,6 +266,7 @@ void wrbuf_write_escaped(WRBUF b, const char *str, size_t len) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab