libcrypto: update to LibreSSL 2.5.4
[unleashed.git] / lib / libcrypto / man / BIO_printf.3
blobebc1cc726e1e7345c164f1681f019326a48cfce0
1 .\"     $OpenBSD: BIO_printf.3,v 1.1 2017/03/25 17:15:59 schwarze Exp $
2 .\"     OpenSSL 2ca2e917 Mon Mar 20 16:25:22 2017 -0400
3 .\"
4 .\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
5 .\"
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
9 .\"
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .\"
18 .Dd $Mdocdate: March 25 2017 $
19 .Dt BIO_PRINTF 3
20 .Os
21 .Sh NAME
22 .Nm BIO_printf ,
23 .Nm BIO_vprintf ,
24 .Nm BIO_snprintf ,
25 .Nm BIO_vsnprintf
26 .Nd formatted output to a BIO
27 .Sh SYNOPSIS
28 .In openssl/bio.h
29 .Ft int
30 .Fo BIO_printf
31 .Fa "BIO *bio"
32 .Fa "const char *format"
33 .Fa ...
34 .Fc
35 .Ft int
36 .Fo BIO_vprintf
37 .Fa "BIO *bio"
38 .Fa "const char *format"
39 .Fa "va_list args"
40 .Fc
41 .Ft int
42 .Fo BIO_snprintf
43 .Fa "char *buf"
44 .Fa "size_t n"
45 .Fa "const char *format"
46 .Fa ...
47 .Fc
48 .Ft int
49 .Fo BIO_vsnprintf
50 .Fa "char *buf"
51 .Fa "size_t n"
52 .Fa "const char *format"
53 .Fa "va_list args"
54 .Fc
55 .Sh DESCRIPTION
56 .Fn BIO_vprintf
57 is a wrapper around
58 .Xr vfprintf 3 ,
59 sending the output to the specified
60 .Fa bio .
61 .Pp
62 .Fn BIO_printf
63 is a wrapper around
64 .Fn BIO_vprintf .
65 .Pp
66 .Fn BIO_snprintf
67 and
68 .Fn BIO_vsnprintf
69 are wrappers around
70 .Xr vsnprintf 3 .
71 .Sh RETURN VALUES
72 These functions return the number of bytes written,
73 or -1 if an error occurs.
74 .Pp
75 In contrast to
76 .Xr snprintf 3
77 and
78 .Xr vsnprintf 3 ,
79 .Fn BIO_snprintf
80 and
81 .Fn BIO_vsnprintf
82 also return -1 if
83 .Fa n
84 is too small to hold the complete output.
85 .Sh SEE ALSO
86 .Xr BIO_new 3