CFfindocc, CFfindocc32
-find occurrence of converted value
#include <stdio.h>
#include "fml.h"
FLDOCC
CFfindocc(FBFR *fbfr, FLDID fieldid, char *value, FLDLEN len, int
type)
#include "fml32.h"
FLDOCC32
CFfindocc32(FBFR32 *fbfr, FLDID32 fieldid, char *value, FLDLEN32
len, int type)
CFfindocc()
acts like Ffindocc()
but first converts the value from the user-specified type to the type of fieldid. CFfindocc()
looks for an occurrence of the specified field in the buffer that matches a user-supplied value, length and type. CFfindocc()
returns the occurrence number of the first field that matches. fbfr is a pointer to a fielded buffer. fieldid is a field identifier. value is a pointer to the value being sought. len is the length of the value to be compared to input value if type is carray. type is the data type of the field in value.
CFfindocc32
is used with 32-bit FML.
If the field value is not found or if other errors are detected, -1 is returned and CFfindocc()
sets Ferror
to indicate the error condition.
Under the following conditions, CFfindocc
() fails and sets Ferror
to:
FALIGNERR
]
FNOTFLD
]
Finit
().
FMALLOC
]
malloc
failed" malloc
(3) failed when converting from a carray to string.
FEINVAL
]
NULL
value parameter was specified).
FNOTPRES
]
FBADFLD
]
FTYPERR
]
Fintro
(3)Ffindocc
(3)