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

Fcmp, Fcmp32(3fml)


Fcmp(), Fcmp32() - compare two fielded buffers


#include <stdio.h> 
#include "fml.h"
Fcmp(FBFR *fbfr1, FBFR *fbfr2)
#include "fml32.h"
Fcmp32(FBFR32 *fbfr1, FBFR32 *fbfr2)


Fcmp() compares the field identifiers and then the field values of two FML buffers. fbfr1 and fbfr2 are pointers to the fielded buffers to be compared.

For values of type FLD_PTR, two pointer fields are considered equal if the pointer values (addresses) are equal. For values of type FLD_FML32, two fields are considered equal if all field occurrences and values are equal. For values of type FLD_VIEW32, two fields are considered equal if the view names are the same, and if all structure member occurrences and values are equal.

Fcmp32() is used with 32-bit FML.

A thread in a multithreaded application may issue a call to Fcmp() or Fcmp32() while running in any context state, including TPINVALIDCONTEXT.

Return Values

The function returns a 0 if the two buffers are identical. It returns a -1 on any of the following conditions:

Fcmp() returns a 1 if any of the reverse set of conditions is true, for example, the fieldid of a fbfr1 field is greater than the fieldid of the corresponding field of fbfr2. The actual sizes of the buffers (that is, the sizes passed to Falloc()) are not considered; only the data in the buffers. This function returns -2 on error and sets Ferror to indicate the error condition.


Under the following conditions, Fcmp() 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().

See Also

Introduction to FML Functions, Fadd, Fadd32(3fml), Fchg, Fchg32(3fml)