0001 CBFIND(3)
0002 =========
0003 :doctype: manpage
0004
0005
0006 NAME
0007 ----
0008 Bfinds - find the field and convert it to *BFLD_STRING*
0009
0010
0011 SYNOPSIS
0012 --------
0013
0014 #include <ubf.h>
0015
0016 char * Bfinds (UBFH *'p_ub', BFLDID 'bfldid', BFLDOCC 'occ');
0017
0018 Link with '-lubf -lnstd -lm -lpthread'
0019
0020 DESCRIPTION
0021 -----------
0022 Function on success returns pointer to data field present in UBF buffer, converted to *BFLD_STRING*. 'p_ub' is pointer to UBF buffer, 'bfldid' is field id, 'occ' is field occurrence at buffer, which needs to be found. Returned pointer is valid only until next UBF operation call, as the converted value is stored in thread local storage used for varous UBF operations.
0023
0024 The function in practice invokes *CBfind(3)* with user type *BFLD_STRING* and len set to NULL.
0025
0026 RETURN VALUE
0027 ------------
0028 On success, *Bfinds()* return zero; on error, -1 is returned, with *Berror* set to indicate the error.
0029
0030 ERRORS
0031 ------
0032 Note that *Bstrerror()* returns generic error message plus custom message with debug info from last function call.
0033
0034 *BALIGNERR* Corrupted buffer or pointing to not aligned memory area.
0035
0036 *BNOTFLD* Buffer not fielded, not correctly allocated or corrupted.
0037
0038 *BNOTPRES* Field not present.
0039
0040 *BMALLOC* Failed to allocate type conversion buffer.
0041
0042 EXAMPLE
0043 -------
0044 See *ubftest/test_macro.c* for sample code.
0045
0046 BUGS
0047 ----
0048 Report bugs to support@mavimax.com
0049
0050 SEE ALSO
0051 --------
0052 *Bchg(3)* *Badd(3)* *CBadd(3)* *Bfind(3)* *Bfindocc(3)* *Bfindlast(3)*
0053
0054 COPYING
0055 -------
0056 (C) Mavimax, Ltd
0057