From a7bff1cefa274c110b80458cba718db5ed0fd97d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 3 Jul 2008 20:01:18 +0200 Subject: [PATCH] Added wrbuf_put - same as wrbuf_puts but void return value. --- include/yaz/wrbuf.h | 4 +++- src/wrbuf.c | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/yaz/wrbuf.h b/include/yaz/wrbuf.h index 37f96e7..2ebc3ef 100644 --- a/include/yaz/wrbuf.h +++ b/include/yaz/wrbuf.h @@ -57,8 +57,10 @@ YAZ_EXPORT void wrbuf_rewind(WRBUF b); /** \brief writes (append) buffer to WRBUF */ YAZ_EXPORT int wrbuf_write(WRBUF b, const char *buf, int size); -/** \brief appends C-string to WRBUF */ +/** \brief appends C-string to WRBUF (returns int) */ YAZ_EXPORT int wrbuf_puts(WRBUF b, const char *buf); +/** \brief appends C-string to WRBUF (void) */ +YAZ_EXPORT int wrbuf_put(WRBUF b, const char *buf); /** \brief writes buffer to WRBUF and XML encode (as CDATA) */ YAZ_EXPORT int wrbuf_xmlputs_n(WRBUF b, const char *cp, int size); diff --git a/src/wrbuf.c b/src/wrbuf.c index 83b296b..f9affa3 100644 --- a/src/wrbuf.c +++ b/src/wrbuf.c @@ -78,6 +78,11 @@ int wrbuf_puts(WRBUF b, const char *buf) return 0; } +void wrbug_put(WRBUF b, const char *buf) +{ + wrbuf_write(b, buf, strlen(buf)); +} + int wrbuf_puts_replace_char(WRBUF b, const char *buf, const char from, const char to) { -- 1.7.10.4