[Top] [Prev] [Next] [Bottom]

Fvall (3FML)

Fvall (3FML)

Name

Fvall, Fvall32-return long value of field occurrence

#include <stdio.h>  
#include "fml.h"

long
Fvall(FBFR *fbfr, FLDID fieldid, FLDOCC oc)

#include "fml32.h"

long
Fvall32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc)

Description

Fvall() works like Ffind(3) for long and short values, but returns the actual value of the field as a long, instead of a pointer to the value. fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field.

If the specified field occurrence is not found, then 0 is returned. This function is useful for passing the value of a field to another function without checking the return value. This function is valid only for fields of type FLD_LONG or FLD_SHORT.

Fvall32 is used with 32-bit FML.

Return Values

For fields of types other than FLD_LONG or FLD_SHORT, Fvall() returns 0 and sets Ferror to FTYPERR.

This function returns 0 on other errors and sets Ferror to indicate the error condition.

Errors

Under the following conditions, Fvall() fails and sets Ferror to:

[FALIGNERR]
"fielded buffer not aligned"
The buffer does not begin on the proper boundary.

[FNOTFLD]
"buffer not fielded"
The buffer is not a fielded buffer or has not been initialized by Finit().

[FBADFLD]
"unknown field number or type"
A field identifier is specified which is not valid.

[FTYPERR]
"invalid field type"
Bad fieldid or the field type is not FLD_SHORT or FLD_LONG.

See Also

Fintro(3), Ffind(3), Fvals(3)



[Top] [Prev] [Next] [Bottom]