![]() |
![]() |
|
|
CFget, CFget32(3fml)
Name
CFget(), CFget32() - get field and convert
Synopsis
#include <stdio.h>
#include "fml.h"
int
CFget(FBFR *fbfr, FLDID fieldid, FLDOCC oc, char *buf, FLDLEN *len,
int type)
#include "fml32.h"
int
CFget32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc, char *buf,
FLDLEN32 *len, int type)
Description
CFget() is the conversion analog of Fget(). The main difference is that it copies a converted value to the user-supplied buffer. fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field. buf is a pointer to private data area. On input, len is a pointer to the length of the private data area. On return, len is a pointer to the length of the returned value. If the len parameter is NULL on input, it is assumed that the buffer is big enough to contain the field value and the length of the value is not returned. If the buf parameter is NULL, the field value is not returned. type is the data type the user wants the returned value converted to.
This function fails if any of the following field types is used: FLD_PTR, FLD_FML32, or FLD_VIEW32. If one of these field types is encountered when CFget() or CFget32() is being used, Ferror is set to FEBADOP.
CFget32() is used with 32-bit FML.
A thread in a multithreaded application may issue a call to CFget() or CFget32() 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, CFget() fails and sets Ferror to:
The buffer does not begin on the proper boundary.
The buffer is not a fielded buffer or has not been initialized by Finit().
Allocation of space dynamically using malloc() failed when converting from a carray to string.
The size of the data area, as specified in len, is not large enough to hold the field value.
A field occurrence is requested but the specified field and/or occurrence was not found in the fielded buffer.
A field identifier is specified which is not valid.
A field identifier is specified which is not valid.
An invalid field type (such as FLD_PTR, FLD_FML32, and FLD_VIEW32) is specified.
See Also
Introduction to FML Functions, Fget, Fget32(3fml)
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|