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