Fvftos(), Fvftos32() - copy from fielded buffer to C structure
Fvftos(FBFR *fbfr, char *cstruct, char *view)
Fvftos32(FBFR32 *fbfr, char *cstruct, char *view)
The Fvftos() function transfers data from a fielded buffer to a C structure. fbfr is a pointer to a fielded buffer. cstruct is a pointer to a C structure. view is a pointer to the name of a compiled view description.
Fields are copied from the fielded buffer into the structure based on the member descriptions in the view. If a field in the fielded buffer has no corresponding member in the C structure, it is ignored. If a member specified in the C structure has no corresponding field in the fielded buffer, a null value is copied into the member. The null value used is definable for each member in the view description.
To store multiple occurrences in the C structure, the structure member should be an array (for example, int zip can store 4 occurrences of zip). If the buffer has fewer occurrences of the field than there are elements in the array, the extra element slots are assigned null values. On the other hand, if the buffer has more occurrences of the field than there are elements in the array, the surplus occurrences are ignored.
There are view description options that inhibit mappings even though a mapping entry exists for a fldid and a member. These options are initially specified in the view file, but can be changed at runtime using Fvopt().
Fvftos32() is used with 32-bit FML.
A thread in a multithreaded application may issue a call to Fvftos() or Fvftos32() while running in any context state, including TPINVALIDCONTEXT.
This function returns -1 on error and sets Ferror to indicate the error condition.
Under the following conditions, Fvftos() fails and sets Ferror to:
The buffer does not begin on the proper boundary.
The buffer is not a fielded buffer or has not been initialized by Finit().
One of the arguments to the function invoked was invalid, (for example, specifying a NULL cstruct parameter to Fvftos)
An Associated Count Member should not be a negative value while transferring data from a structure to a fielded buffer.
The view description specified was NULL or was not found in the files specified by VIEWDIR or VIEWFILES.
Introduction to FML Functions, Fvopt, Fvopt32(3fml), viewfile(5)
Copyright © 2000 BEA Systems, Inc. All rights reserved.