REALLOC(3)


Table of Contents

1. NAME
2. SYNOPSIS
3. DESCRIPTION
4. RETURN VALUE
5. ERRORS
6. EXAMPLE
7. BUGS
8. SEE ALSO
9. COPYING

1. NAME

Brealloc - Reallocate buffer to given size

2. SYNOPSIS

#include <ubf.h>

UBFH * Brealloc (UBFH *p_ub, BFLDOCC f, BFLDLEN v);

Link with -lubf -lnstd -lm -lpthread

3. DESCRIPTION

Reallocates UBF buffer to store the number of fields of f with total data length of v bytes, length must include zero terminator byte for strings.

4. RETURN VALUE

On success, Brealloc() returns pointer to UBF buffer; on error, NULL is returned, with Berror set to indicate the error.

5. ERRORS

Note that Bstrerror() returns generic error message plus custom message with debug info from last function call.

BEINVAL Buffer is shorter than currently bytes used, or the total size of bigger than MAXUBFLEN.

BMALLOC Malloc failed.

6. EXAMPLE

See ubftest/test_mem.c for sample code.

7. BUGS

Report bugs to support@mavimax.com

8. SEE ALSO

Bfree(3) Balloc(3) Binit(3) Bused(3) Bneeded(3)

9. COPYING

© Mavimax, Ltd