Fcmp, Fcmp32 - compare two fielded buffers
#include <stdio.h> #include "fml.h" int Fcmp(FBFR *fbfr1, FBFR *fbfr2) #include "fml32.h" int 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.
Fcmp32 is used with 32-bit FML.
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: