From 3fec27d8561b3634b4c1c6e32f09395d9690509f Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 30 Jan 2008 19:58:24 +0000 Subject: [PATCH] Added wrbuf_iconv_puts_cdata --- include/yaz/wrbuf.h | 7 +++++-- src/wrbuf.c | 9 +++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/yaz/wrbuf.h b/include/yaz/wrbuf.h index ef21998..dc2a75d 100644 --- a/include/yaz/wrbuf.h +++ b/include/yaz/wrbuf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995-2007, Index Data + * Copyright (c) 1995-2008, Index Data * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: wrbuf.h,v 1.28 2007-11-15 08:45:52 adam Exp $ */ +/* $Id: wrbuf.h,v 1.29 2008-01-30 19:58:24 adam Exp $ */ /** * \file wrbuf.h @@ -86,6 +86,9 @@ YAZ_EXPORT int wrbuf_iconv_write(WRBUF b, yaz_iconv_t cd, const char *buf, int size); YAZ_EXPORT int wrbuf_iconv_write_cdata(WRBUF b, yaz_iconv_t cd, const char *buf, int size); +YAZ_EXPORT int wrbuf_iconv_puts_cdata(WRBUF b, yaz_iconv_t cd, + const char *strz); + YAZ_EXPORT int wrbuf_iconv_puts(WRBUF b, yaz_iconv_t cd, const char *strz); YAZ_EXPORT int wrbuf_iconv_putchar(WRBUF b, yaz_iconv_t cd, int ch); diff --git a/src/wrbuf.c b/src/wrbuf.c index ce77914..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.22 2007-11-15 08:45:52 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) -- 1.7.10.4