Fvstof, Fvstof32 - copy from C structure to fielded buffer
#include <stdio.h> #include "fml.h" int Fvstof(FBFR *fbfr, char *cstruct, int mode, char *view) #include "fml32.h" int Fvstof32(FBFR32 *fbfr, char *cstruct, int mode, char *view)
Fvstof() transfers data from a C structure to a fielded buffer. fbfr is a pointer to a fielded buffer. cstruct is a pointer to a C structure. mode specifies the manner in which the transfer is made. view is a pointer to a compiled view description. mode has four possible values: FUPDATE FOJOIN FJOIN FCONCAT The action of these modes are the same as that described in Fupdate(3fml), Fojoin(3fml), Fjoin(3fml), and Fconcat(3fml). One can even think of Fvstof() as the same as these functions, except that where they specify a source buffer, Fvstof() specifies a C structure. Bear in mind that FUPDATE does not move structure elements that have null values.
Fvstof32 is used for views defined with viewc32 or VIEW32 typed buffers for larger views with more fields.
This function returns -1 on error and sets Ferror to indicate the error condition.
Under the following conditions, Fvstof() fails and sets Ferror to:
Fintro(3fml),
Fconcat(3fml),
Fjoin(3fml),
Fojoin(3fml),
Fupdate(3fml),
Fvftos(3fml)