diff options
author | Beat Bolli <dev@drbeat.li> | 2017-01-20 19:58:49 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-06-08 11:54:16 +0100 |
commit | e9b77246879071308130cda42336338ddb63cbb4 (patch) | |
tree | fc69eee78ddd45bc873d1d6ee103139bdaf27674 /doc/man3/BIO_s_file.pod | |
parent | 61ced34f8d7a7f1dedaa5a5b3554c4dcdec610df (diff) |
doc/man3: reformat the function prototypes in the synopses
I tried hard to keep the lines at 80 characters or less, but in a few
cases I had to punt and just indented the subsequent lines by 4 spaces.
A few well-placed typedefs for callback functions would really help, but
these would be part of the API, so that's probably for later.
I also took the liberty of inserting empty lines in overlong blocks to
provide some visual space.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1956)
Diffstat (limited to 'doc/man3/BIO_s_file.pod')
-rw-r--r-- | doc/man3/BIO_s_file.pod | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/man3/BIO_s_file.pod b/doc/man3/BIO_s_file.pod index fa3016f950..14ce952065 100644 --- a/doc/man3/BIO_s_file.pod +++ b/doc/man3/BIO_s_file.pod @@ -10,7 +10,7 @@ BIO_rw_filename - FILE bio #include <openssl/bio.h> - const BIO_METHOD * BIO_s_file(void); + const BIO_METHOD *BIO_s_file(void); BIO *BIO_new_file(const char *filename, const char *mode); BIO *BIO_new_fp(FILE *stream, int flags); @@ -85,12 +85,14 @@ lingual environment, encode file names in UTF-8. File BIO "hello world": BIO *bio_out; + bio_out = BIO_new_fp(stdout, BIO_NOCLOSE); BIO_printf(bio_out, "Hello World\n"); Alternative technique: BIO *bio_out; + bio_out = BIO_new(BIO_s_file()); if (bio_out == NULL) /* Error */ @@ -101,6 +103,7 @@ Alternative technique: Write to a file: BIO *out; + out = BIO_new_file("filename.txt", "w"); if (!out) /* Error */ @@ -110,6 +113,7 @@ Write to a file: Alternative technique: BIO *out; + out = BIO_new(BIO_s_file()); if (out == NULL) /* Error */ |