Back to home page

Enduro/X

 
 

    


0001 BADDS(3)
0002 ========
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 Badds - Add field to UBF buffer, string type
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 
0014 #include <ubf.h>
0015 
0016 int Badds (UBFH *'p_ub', BFLDID 'bfldid', char *'buf');
0017 
0018 Link with '-lubf -lnstd -lm -lpthread'
0019 
0020 DESCRIPTION
0021 -----------
0022 Add string value to UBF buffer field. The UBF buffer pointer is passed by 'p_ub', field id in 'bfldid'. The user value is passed in 'buf'. Function basically is wrapper for:
0023 
0024 --------------------------------------------------------------------------------
0025 CBadd(p_ub, bfldid, buf, 0, BFLD_STRING);
0026 --------------------------------------------------------------------------------
0027 
0028 RETURN VALUE
0029 ------------
0030 On success, *Badds()* return zero; on error, -1 is returned, with *Berror* set to indicate the error.
0031 
0032 ERRORS
0033 ------
0034 Note that *Bstrerror()* returns generic error message plus custom message with debug info from last function call.
0035 
0036 *BALIGNERR* Corrupted buffer or pointing to not aligned memory area.
0037 
0038 *BNOTFLD* Buffer not fielded, not correctly allocated or corrupted.
0039 
0040 *BNOSPACE* No space in buffer for string data.
0041 
0042 *BMALLOC* Failed to allocate type conversion buffer.
0043 
0044 EXAMPLE
0045 -------
0046 See *ubftest/test_macro.c* for sample code.
0047 
0048 BUGS
0049 ----
0050 Report bugs to support@mavimax.com
0051 
0052 SEE ALSO
0053 --------
0054 *CBchg(3)* *Bdel(3)* *Badd(3)* *Bchg(3)* *CBadd(3)*
0055 
0056 COPYING
0057 -------
0058 (C) Mavimax, Ltd
0059