0001 BWRITE(3)
0002 =========
0003 :doctype: manpage
0004
0005
0006 NAME
0007 ----
0008 Bwrite - Write the UBF buffer in binary form to stream
0009
0010
0011 SYNOPSIS
0012 --------
0013
0014 #include <ubf.h>
0015
0016 int Bwrite (UBFH *'p_ub', FILE *'outf');
0017
0018 Link with '-lubf -lnstd -lm -lpthread'
0019
0020 DESCRIPTION
0021 -----------
0022 Write the UBF buffer 'p_ub' to output stream ('outf'). The output buffer format
0023 is in machine architecture dependent (LSB/MSB, integer size).
0024 To output only used space of the UBF buffer is streamed.
0025
0026 RETURN VALUE
0027 ------------
0028 On success, *Bwrite()* return zero; on error, -1 is returned,
0029 with *Berror* set to indicate the error.
0030
0031 ERRORS
0032 ------
0033 Note that *Bstrerror()* returns generic error message plus custom message
0034 with debug info from last function call.
0035
0036 *BALIGNERR* Corrupted buffer or pointing to not aligned memory area.
0037
0038 *BNOTFLD* Buffer not fielded, not correctly allocated or corrupted.
0039
0040 *BEINVAL* 'outf' is NULL.
0041
0042 *BEUNIX* Failed to read from stream.
0043
0044 *BNOSPACE* No space in 'p_ub'.
0045
0046 EXAMPLE
0047 -------
0048 See *ubftest/test_readwrite.c* for sample code.
0049
0050 BUGS
0051 ----
0052 Report bugs to support@mavimax.com
0053
0054 SEE ALSO
0055 --------
0056 *Bfprint(3)* *Bprint(3)* *Bread(3)* *ud(8)* *Bextread(3)*
0057
0058 COPYING
0059 -------
0060 (C) Mavimax, Ltd
0061