Bread — Read the UBF buffer from Bwrite(3) serialized format
Bread() function reads the buffer from input stream (inf). Buffer is restored into p_ub. The used/free space is updated accordingly. The buffer format is in machine architecture dependent (LSB/MSB, integer size). The p_fb shall have enough space allocated before this function call.
On success, Bread() return zero; on error, -1 is returned, with Berror set to indicate the error.
Note that Bstrerror() returns generic error message plus custom message with debug info from last function call.
BALIGNERR Corrupted buffer or pointing to not aligned memory area.
BNOTFLD Buffer not fielded, not correctly allocated or corrupted.
BEINVAL inf is NULL.
BEUNIX Failed to read from stream.