Fgetsa, Fgetsa32 - malloc space and get converted value
#include <stdio.h> #include "fml.h" char * Fgetsa(FBFR *fbfr, FLDID fieldid, FLDOCC oc, FLDLEN *extra) #include "fml32.h" char * Fgetsa32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc, FLDLEN32 *extra)
Fgetsa() is a macro that calls CFgetalloc(3fml). fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field. The function uses malloc(3) (in UNIX System programmer's reference manuals) to allocate space for the retireved field value that has been converted to a string. If extra is not NULL, it specifies the extra space to allocate in addition to the field value size; the total size is returned in extra.
It is the responsibility of the user to free(3) (in UNIX System reference manuals) the space malloc'd.
Fgetsa32 is used with 32-bit FML.
On success, the function returns a pointer to the allocated buffer.
This function returns NULL on error and sets Ferror to indicate the error condition.
Under the following conditions, Fgetsa() fails and sets Ferror to:
Fintro(3fml),
CFget(3c),
Fget(3fml),
Fgetlast(3fml),
Fgets(3fml),
free(3), malloc(3) in a UNIX System reference manual