From: Adam Dickmeiss Date: Thu, 3 Jul 2008 18:01:18 +0000 (+0200) Subject: Added wrbuf_put - same as wrbuf_puts but void return value. X-Git-Tag: v3.0.36~24 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=a7bff1cefa274c110b80458cba718db5ed0fd97d;p=yaz-moved-to-github.git Added wrbuf_put - same as wrbuf_puts but void return value. --- 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) {