0001 BLEN(3)
0002 =======
0003 :doctype: manpage
0004
0005
0006 NAME
0007 ----
0008 Blen - Return field length
0009
0010
0011 SYNOPSIS
0012 --------
0013
0014 #include <ubf.h>
0015
0016 int Blen (UBFH *p_ub, BFLDID bfldid, BFLDOCC occ);
0017
0018 Link with '-lubf -lnstd -lm -lpthread'
0019
0020 DESCRIPTION
0021 -----------
0022 Return the field length in bytes for given field at given occurrence. 'p_ub'
0023 is pointer to *UBF* buffer (allocated with tpalloc(3), buffer type "UBF",
0024 "FML" or "FML32"). 'bfldid' is UBF buffer field id (which is generated by mkfldhdr(8)),
0025 'occ' is field occurrence in buffer.
0026
0027 RETURN VALUE
0028 ------------
0029 On success, *Blen()* returns field length in bytes; on error, -1 is returned,
0030 with *Berror* set to indicate 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 NULL.
0040
0041 *BBADFLD* Invalid field id passed.
0042
0043 *BNOTPRES* Field not present.
0044
0045 EXAMPLE
0046 -------
0047 See *ubftest/ubfunit1.c* for sample code.
0048
0049 BUGS
0050 ----
0051 Report bugs to support@mavimax.com
0052
0053 SEE ALSO
0054 --------
0055 *Badd(3)* *Bfind(3)*
0056
0057 COPYING
0058 -------
0059 (C) Mavimax, Ltd
0060