CFget, CFget32 - get field and convert
#include <stdio.h> #include "fml.h" int CFget(FBFR *fbfr, FLDID fieldid, FLDOCC oc, char *buf, FLDLEN *len, int type) #include "fml32.h" int CFget32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc, char *buf, FLDLEN32 *len, int type)
CFget() is the conversion analog of Fget(3fml). The main difference is that it copies a converted value to the user supplied buffer. fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field. buf is a pointer to private data area. On input, len is a pointer to the length of the private data area. On return, len is a pointer to the length of the returned value. If the len parameter is NULL on input, it is assumed that the buffer is big enough to contain the field value and the length of the value is not returned. If the buf parameter is NULL, the field value is not returned. type is the data type the user wants the returned value converted to.
CFget32 is used with 32-bit FML.
This function returns -1 on error and sets Ferror to indicate the error condition.
Under the following conditions, CFget() fails and sets Ferror to: