BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy


   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo FML Function Reference

Fvstof, Fvstof32(3fml)


Fvstof(), Fvstof32() - copy from C structure to fielded buffer


#include <stdio.h> 
#include "fml.h"

Fvstof(FBFR *fbfr, char *cstruct, int mode, char *view)

#include "fml32.h"

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 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.


Under the following conditions, Fvstof() fails and sets Ferror to:


"fielded buffer not aligned"
The buffer does not begin on the proper boundary.


"buffer not fielded"
The buffer is not a fielded buffer or has not been initialized by Finit().


"invalid argument to function"
One of the arguments to the function invoked was invalid (for example, specifying a NULL cstruct parameter or an invalid mode to Fvstof())


"no space in fielded buffer"
A field value is to be added or changed in a fielded buffer but there is not enough space remaining in the buffer.


"ACM contains negative value"
An Associated Count Member should not be a negative value while transferring data from a structure to a fielded buffer.


"malloc failed"
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)