Boccur — Return number field occurrences (i.e. number of array elements)
#include <ubf.h>
BFLDOCC Boccur (UBFH *p_ub, BFLDID bfldid);
Link with -lubf -lnstd -lm -lpthread
Get the number of field occurrences in buffer. p_ub is pointer to UBF buffer (allocated with tpalloc(3), buffer type "UBF", "FML" or "FML32"). bfldid is UBF buffer field id (which is generated by mkfldhdr(8)).
On success, Boccur() returns number of field occurrences; If field not found, then return is 0; on error, -1 is returned, with Berror set to indicate the error.