![]() |
![]() |
|
|
Fvstof, Fvstof32(3fml)
Name
Fvstof(), Fvstof32() - copy from C structure to fielded buffer
Synopsis
#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)
Description
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 Fupdate(), Fojoin(), Fjoin(), and Fconcat(). 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.
A thread in a multithreaded application may issue a call to Fvstof() or Fvstof32() while running in any context state, including TPINVALIDCONTEXT.
Return Values
This function returns -1 on error and sets Ferror to indicate the error condition.
Errors
Under the following conditions, Fvstof() 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 or an invalid mode to Fvstof())
A field value is to be added or changed in a fielded buffer but there is not enough space remaining in the buffer.
An Associated Count Member should not be a negative value while transferring data from a structure to a fielded buffer.
Allocation of space dynamically using malloc() failed when converting from a carray or string value.
See Also
Introduction to FML Functions, Fconcat, Fconcat32(3fml), Fjoin, Fjoin32(3fml), Fojoin, Fojoin32(3fml), Fupdate, Fupdate32(3fml), Fvftos, Fvftos32(3fml)
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|