Falloc, Falloc32 - allocate and initialize fielded buffer
#include <stdio.h> #include "fml.h" FBFR * Falloc(FLDOCC F, FLDLEN V) #include "fml32.h" FBFR32 * Falloc32(FLDOCC32 F, FLDLEN32 V)
Falloc() dynamically allocates space using malloc(3) for a fielded buffer and calls Finit() to initialize it. The parameters are the number of fields, F, and the number of bytes of value space, V, for all fields that are to be stored in the buffer.
Falloc32 is used for larger buffers with more fields.
This function returns NULL on error and sets Ferror to indicate the error condition.
Under the following conditions, Falloc() fails and sets Ferror to:
Fintro(3fml),
Ffree(3fml),
Fielded(3fml),
Finit(3fml),
Fneeded(3fml),
Frealloc(3fml),
Fsizeof(3fml),
Funused(3fml),
malloc(3) in a UNIX system reference manual