0001 Boccur(3)
0002 =========
0003 :doctype: manpage
0004
0005
0006 NAME
0007 ----
0008 Boccur - Return number field occurrences (i.e. number of array elements)
0009
0010
0011 SYNOPSIS
0012 --------
0013
0014 #include <ubf.h>
0015
0016 BFLDOCC Boccur (UBFH *'p_ub', BFLDID 'bfldid');
0017
0018 Link with '-lubf -lnstd -lm -lpthread'
0019
0020 DESCRIPTION
0021 -----------
0022 Get the number of field occurrences in buffer. 'p_ub' is pointer to *UBF* buffer
0023 (allocated with tpalloc(3), buffer type "UBF", "FML" or "FML32"). 'bfldid' is
0024 UBF buffer field id (which is generated by mkfldhdr(8)).
0025
0026 RETURN VALUE
0027 ------------
0028 On success, *Boccur()* returns number of field occurrences; If field not found,
0029 then return is *0*; on error, *-1* is returned, with *Berror* set to indicate
0030 the error.
0031
0032
0033 ERRORS
0034 ------
0035 Bstrerror(3) can give more description for error (for last call).
0036
0037 *BALIGNERR* Corrupted buffer or pointing to not aligned memory area.
0038
0039 *BNOTFLD* Buffer not fielded, not correctly allocated or corrupted. p_ub is
0040 NULL.
0041
0042 *FBADFLD* Invalid field type.
0043
0044 EXAMPLE
0045 -------
0046 See *ubftest/ubfunit1.c* for sample code.
0047
0048 BUGS
0049 ----
0050 Report bugs to support@mavimax.com
0051
0052 SEE ALSO
0053 --------
0054 *Badd(3)* *Bfind(3)*
0055
0056 COPYING
0057 -------
0058 (C) Mavimax, Ltd
0059