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

Finit, Finit32(3fml)

Name

Finit(), Finit32() - initialize fielded buffer

Synopsis

#include <stdio.h> 
#include "fml.h"
int
Finit(FBFR *fbfr, FLDLEN buflen)
#include "fml32.h"
int
Finit32(FBFR32 *fbfr, FLDLEN32 buflen)

Description

Finit() can be called to initialize a fielded buffer statically. fbfr is a pointer to a fielded buffer. buflen is the length of the buffer. The function takes the buffer pointer and buffer length, and sets up the internal structure for a buffer with no fields. Finit() can also be used to re-initialize a previously used buffer.

Finit32() is used with 32-bit FML.

A thread in a multithreaded application may issue a call to Finit() or Finit32() 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, Finit() fails and sets Ferror to:

[FALIGNERR]

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

[FNOTFLD]

"buffer not fielded"
The buffer pointer is NULL.

[FNOSPACE]

"no space in fielded buffer"
The buffer size specified is too small for a fielded buffer.

Example

The correct way to re-initialize a buffer to have no fields is: Finit(fbfr, (FLDLEN)Fsizeof(fbfr));

See Also

Introduction to FML Functions, Falloc, Falloc32(3fml), Fneeded, Fneeded32(3fml), Frealloc, Frealloc32(3fml)