Name
Bused — Return the number bytes used in buffer
Synopsis
#include <ubf.h>
long Bused (UBFH *p_ub );
Link with -lubf -lnstd -lm -lpthread
DESCRIPTION
Return the number of bytes used in p_ub buffer.
RETURN VALUE
On success, Bused() return the number of bytes used; on error, -1 is returned, with Berror set to indicate the error.
ERRORS
Bstrerror(3) can give more description for error (for last call).
BALIGNERR Corrupted buffer or pointing to not aligned memory area.
BNOTFLD Buffer not fielded, not correctly allocated or corrupted. p_ub is NULL.
EXAMPLE
See ubftest/test_badd.c for sample code.