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:
[FMALLOC]
[FEINVAL]
[FTYPERR]
Fintro
(3), CFadd
(3), CFchg
(3), CFget
(3), CFgetalloc
(3), CFfind
(3)