|
|
Flen, Flen32(3fml)
Name
Flen(), Flen32() - return len of field occurrence in buffer
Synopsis
#include <stdio.h>
#include "fml.h"
int
Flen(FBFR *fbfr, FLDID fieldid, FLDOCC oc)
#include "fml32.h"
long
Flen32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc)
Description
Flen() finds the value of the specified field occurrence in the buffer and returns its length. fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field.
For values of type FLD_PTR, Flen32() returns a fixed length for a pointer field based on sizeof(char*). For values of type FLD_FML32, Flen32() returns the value of Fused32() for the length of the nested buffer. For values of type FLD_VIEW32, Flen32() returns the length of the view data plus the length of the view name.
Flen32() is used with 32-bit FML.
A thread in a multithreaded application may issue a call to Flen() or Flen32() while running in any context state, including TPINVALIDCONTEXT.
Return Values
On success, Flen() returns the field length.
This function returns -1 on error and sets Ferror to indicate the error condition.
Errors
Under the following conditions, Flen() 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().
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.
See Also
Introduction to FML Functions, Fnum, Fnum32(3fml), Fpres, Fpres32(3fml)
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|