Binit — Initialise UBF buffer
Initialise UBF buffer manually. Normally tpalloc(3) does this. But it is possible to make other buffers than XATMI to function as UBF. p_ub is pointer to memory block, len is memory size in bytes.
For example:
char buf[1024]; UBFH *p_ub = (UBFH *)buf; if (0!=Binit(p_ub, sizeof(buf))) { fprintf(stderr, "Failed to Binit: %s\n", Bstrerror(Berror)); }
On success, Binit() return zero; on error, -1 is returned, with Berror set to indicate the error.