Back to home page

Enduro/X

 
 

    


0001 BALLOC(3)
0002 =========
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 Balloc - Allocated UBF buffer
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 
0014 #include <ubf.h>
0015 
0016 UBFH * Balloc (BFLDOCC 'f', BFLDLEN 'v');
0017 
0018 Link with '-lubf -lnstd -lm -lpthread'
0019 
0020 DESCRIPTION
0021 -----------
0022 Allocates UBF buffer to store the number of fields of 'f' with total data storage
0023 in bytes of 'v'. The 'v' must also include the size for terminating zero bytes
0024 for strings if any string is added to buffer.
0025 
0026 
0027 RETURN VALUE
0028 ------------
0029 On success, *Balloc()* returns pointer to UBF buffer; on error, NULL is 
0030 returned, with *Berror* set to indicate the error.
0031 
0032 ERRORS
0033 ------
0034 Note that *Bstrerror()* returns generic error message plus custom 
0035 message with debug info from last function call.
0036 
0037 *BEINVAL* The total size of bigger than *MAXUBFLEN*.
0038 
0039 *BMALLOC* Malloc failed.
0040 
0041 EXAMPLE
0042 -------
0043 See *ubftest/test_mem.c* for sample code.
0044 
0045 BUGS
0046 ----
0047 Report bugs to support@mavimax.com
0048 
0049 SEE ALSO
0050 --------
0051 *Bfree(3)* *Brealloc(3)* *Binit(3)* *Bneeded(3)*
0052 
0053 COPYING
0054 -------
0055 (C) Mavimax, Ltd
0056