Back to home page

Enduro/X

 
 

    


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