From 9272614d9dad501ad95ac76b40f53e433a4878bc Mon Sep 17 00:00:00 2001 From: Gregor Beck Date: Thu, 17 Mar 2011 10:20:30 +0100 Subject: s3: add function cbuf_print_quoted --- source3/lib/cbuf.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'source3/lib/cbuf.h') diff --git a/source3/lib/cbuf.h b/source3/lib/cbuf.h index ffb52d7b9a..90318ec7a9 100644 --- a/source3/lib/cbuf.h +++ b/source3/lib/cbuf.h @@ -225,11 +225,26 @@ char* cbuf_gets(cbuf* b, size_t idx); * @see srprs_quoted_string * * @param[out] ost outstream - * @param[in] s string + * @param[in] s '\0' terminated string of printable characters. * * @return numner of bytes written, -1 on error */ int cbuf_print_quoted_string(cbuf* ost, const char* s); +/** + * Print quoted string to stream. + * Escapes nonprintable characters. + * + * @todo check for ssputc failure + * @see srprs_quoted + * + * @param[out] ost outstream + * @param[in] s string of bytes + * @param[in] len number of bytes + * + * @return numner of bytes written, -1 on error + */ +int cbuf_print_quoted(cbuf* ost, const char* s, size_t len); + #endif /*__CBUF_H*/ -- cgit