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:
The action of these modes are the same as that described in This function returns -1 on error and sets Under the following conditions, Fupdate
(3), Fojoin
(3), Fjoin
(3), and Fconcat
(3). 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.
Return Values
Ferror
to indicate the error condition.
Errors
Fvstof
() fails and sets Ferror
to:
[FALIGNERR]
[FNOTFLD]
Finit
().
[FEINVAL]
Fvstof
)
[FNOSPACE]
[FBADACM]
[FMALLOC]
malloc
(3) failed when converting from a carray or string value.
Fintro
(3), Fconcat
(3), Fjoin
(3), Fojoin
(3), Fupdate
(3), Fvftos
(3)