Ftypcvt, Ftypcvt32 - convert from one field type to another
#include <stdio.h> #include "fml.h" char * Ftypcvt(FLDLEN *tolen, int totype, char *fromval, int fromtype, FLDLEN fromlen) #include "fml32.h" char * Ftypcvt32(FLDLEN32 *tolen, int totype, char *fromval, int fromtype, FLDLEN32 fromlen)
Ftypcvt() converts the value *fromval, which has type fromtype, and length fromlen (if fromtype is FLD\_CARRAY; otherwise, fromlen is inferred from fromtype), to a value of type totype. Ftypcvt() returns a pointer to the converted value, and sets *tolen to the converted length, upon success. Upon failure, Ftypcvt() returns NULL.
Ftypcvt32 is used with 32-bit FML.
This function returns NULL on error and sets Ferror to indicate the error condition.
Under the following conditions, Ftypcvt() fails and sets Ferror to:
Fintro(3fml),
CFadd(3fml),
CFchg(3fml),
CFget(3fml),
CFgetalloc(3fml),
CFfind(3fml)