User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v7.5.x:api:ubf:bnum.3

Bnum

Name

Bnum — Return number of all field occurrences

Synopsis

#include <ubf.h>

BFLDOCC Bnum (UBFH *p_ub);

Link with -lubf -lnstd -lm -lpthread

DESCRIPTION

Get the number of all field occurrences in buffer. p_ub is pointer to UBF buffer (allocated with tpalloc(3), buffer type "UBF", "FML" or "FML32").

RETURN VALUE

On success, Bnum() returns number of all field occurrences; If fields not found, then return is 0; 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.

FBADFLD Invalid field type.

EXAMPLE

See ubftest/test_bnum.c for sample code.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd