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:
[FMALLOC]
malloc
(3) failed.
[FEINVAL]
Fintro
(3)Ffree
(3)Fielded
(3)Finit
(3)Fneeded
(3)Frealloc
(3)Fsizeof
(3)Funused
(3)malloc
(3)