1*b077aed3SPierre Pronchery=pod
2*b077aed3SPierre Pronchery
3*b077aed3SPierre Pronchery=head1 NAME
4*b077aed3SPierre Pronchery
5*b077aed3SPierre ProncheryBIO_f_prefix, BIO_set_prefix, BIO_set_indent, BIO_get_indent
6*b077aed3SPierre Pronchery- prefix BIO filter
7*b077aed3SPierre Pronchery
8*b077aed3SPierre Pronchery=head1 SYNOPSIS
9*b077aed3SPierre Pronchery
10*b077aed3SPierre Pronchery #include <openssl/bio.h>
11*b077aed3SPierre Pronchery
12*b077aed3SPierre Pronchery const BIO_METHOD *BIO_f_prefix(void);
13*b077aed3SPierre Pronchery long BIO_set_prefix(BIO *b, const char *prefix);
14*b077aed3SPierre Pronchery long BIO_set_indent(BIO *b, long indent);
15*b077aed3SPierre Pronchery long BIO_get_indent(BIO *b);
16*b077aed3SPierre Pronchery
17*b077aed3SPierre Pronchery=head1 DESCRIPTION
18*b077aed3SPierre Pronchery
19*b077aed3SPierre ProncheryBIO_f_cipher() returns the prefix BIO method. This is a filter for
20*b077aed3SPierre Proncherytext output, where each line gets automatically prefixed and indented
21*b077aed3SPierre Proncheryaccording to user input.
22*b077aed3SPierre Pronchery
23*b077aed3SPierre ProncheryThe prefix and the indentation are combined.  For each line of output
24*b077aed3SPierre Proncherygoing through this filter, the prefix is output first, then the amount
25*b077aed3SPierre Proncheryof additional spaces indicated by the indentation, and then the line
26*b077aed3SPierre Proncheryitself.
27*b077aed3SPierre Pronchery
28*b077aed3SPierre ProncheryBy default, there is no prefix, and indentation is set to 0.
29*b077aed3SPierre Pronchery
30*b077aed3SPierre ProncheryBIO_set_prefix() sets the prefix to be used for future lines of
31*b077aed3SPierre Proncherytext, using I<prefix>.  I<prefix> may be NULL, signifying that there
32*b077aed3SPierre Proncheryshould be no prefix.  If I<prefix> isn't NULL, this function makes a
33*b077aed3SPierre Proncherycopy of it.
34*b077aed3SPierre Pronchery
35*b077aed3SPierre ProncheryBIO_set_indent() sets the indentation to be used for future lines of
36*b077aed3SPierre Proncherytext, using I<indent>.  Negative values are not allowed.
37*b077aed3SPierre Pronchery
38*b077aed3SPierre ProncheryBIO_get_indent() gets the current indentation.
39*b077aed3SPierre Pronchery
40*b077aed3SPierre Pronchery=head1 NOTES
41*b077aed3SPierre Pronchery
42*b077aed3SPierre ProncheryBIO_set_prefix(), BIO_set_indent() and BIO_get_indent() are
43*b077aed3SPierre Proncheryimplemented as macros.
44*b077aed3SPierre Pronchery
45*b077aed3SPierre Pronchery=head1 RETURN VALUES
46*b077aed3SPierre Pronchery
47*b077aed3SPierre ProncheryBIO_f_prefix() returns the prefix BIO method.
48*b077aed3SPierre Pronchery
49*b077aed3SPierre ProncheryBIO_set_prefix() returns 1 if the prefix was correctly set, or <=0 on
50*b077aed3SPierre Proncheryfailure.
51*b077aed3SPierre Pronchery
52*b077aed3SPierre ProncheryBIO_set_indent() returns 1 if the prefix was correctly set, or <=0 on
53*b077aed3SPierre Proncheryfailure.
54*b077aed3SPierre Pronchery
55*b077aed3SPierre ProncheryBIO_get_indent() returns the current indentation, or a negative value for failure.
56*b077aed3SPierre Pronchery
57*b077aed3SPierre Pronchery=head1 SEE ALSO
58*b077aed3SPierre Pronchery
59*b077aed3SPierre ProncheryL<bio(7)>
60*b077aed3SPierre Pronchery
61*b077aed3SPierre Pronchery=head1 COPYRIGHT
62*b077aed3SPierre Pronchery
63*b077aed3SPierre ProncheryCopyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
64*b077aed3SPierre Pronchery
65*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
66*b077aed3SPierre Proncherythis file except in compliance with the License.  You can obtain a copy
67*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at
68*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>.
69*b077aed3SPierre Pronchery
70*b077aed3SPierre Pronchery=cut
71