From 9c3ad2c9faadea9f56fc1bd8b254fc2fa40558eb Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Sat, 25 Mar 2017 17:15:59 +0000 Subject: OpenSSL documented the public function BIO_printf(3) (and friends) in commit 2ca2e917. Document it here, too, but do not use their text. Be more concise and more precise at the same time. --- src/lib/libcrypto/man/BIO_printf.3 | 86 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 src/lib/libcrypto/man/BIO_printf.3 (limited to 'src/lib/libcrypto/man/BIO_printf.3') diff --git a/src/lib/libcrypto/man/BIO_printf.3 b/src/lib/libcrypto/man/BIO_printf.3 new file mode 100644 index 0000000000..ebc1cc726e --- /dev/null +++ b/src/lib/libcrypto/man/BIO_printf.3 @@ -0,0 +1,86 @@ +.\" $OpenBSD: BIO_printf.3,v 1.1 2017/03/25 17:15:59 schwarze Exp $ +.\" OpenSSL 2ca2e917 Mon Mar 20 16:25:22 2017 -0400 +.\" +.\" Copyright (c) 2017 Ingo Schwarze +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: March 25 2017 $ +.Dt BIO_PRINTF 3 +.Os +.Sh NAME +.Nm BIO_printf , +.Nm BIO_vprintf , +.Nm BIO_snprintf , +.Nm BIO_vsnprintf +.Nd formatted output to a BIO +.Sh SYNOPSIS +.In openssl/bio.h +.Ft int +.Fo BIO_printf +.Fa "BIO *bio" +.Fa "const char *format" +.Fa ... +.Fc +.Ft int +.Fo BIO_vprintf +.Fa "BIO *bio" +.Fa "const char *format" +.Fa "va_list args" +.Fc +.Ft int +.Fo BIO_snprintf +.Fa "char *buf" +.Fa "size_t n" +.Fa "const char *format" +.Fa ... +.Fc +.Ft int +.Fo BIO_vsnprintf +.Fa "char *buf" +.Fa "size_t n" +.Fa "const char *format" +.Fa "va_list args" +.Fc +.Sh DESCRIPTION +.Fn BIO_vprintf +is a wrapper around +.Xr vfprintf 3 , +sending the output to the specified +.Fa bio . +.Pp +.Fn BIO_printf +is a wrapper around +.Fn BIO_vprintf . +.Pp +.Fn BIO_snprintf +and +.Fn BIO_vsnprintf +are wrappers around +.Xr vsnprintf 3 . +.Sh RETURN VALUES +These functions return the number of bytes written, +or -1 if an error occurs. +.Pp +In contrast to +.Xr snprintf 3 +and +.Xr vsnprintf 3 , +.Fn BIO_snprintf +and +.Fn BIO_vsnprintf +also return -1 if +.Fa n +is too small to hold the complete output. +.Sh SEE ALSO +.Xr BIO_new 3 -- cgit v1.2.3-55-g6feb