PURPOSE

Fneeded, Fneeded32 - compute size needed for buffer

SYNOPSIS


#include <stdio.h>
#include "fml.h"
long
Fneeded(FLDOCC F, FLDLEN V)
#include "fml32.h"
long
Fneeded32(FLDOCC32 F, FLDLEN32 V)

DESCRIPTION

Fneeded() if used to determine the space that must be allocated for F fields and V bytes of value space.

Fneeded32 is used with 32-bit FML.

RETURN VALUES

This function returns -1 on error and sets Ferror to indicate the error condition.

ERRORS

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

[FEINVAL]
"invalid argument to function"
One of the arguments to the function invoked was invalid, (for example, number of fields is less than 0, V is 0 or total size is greater than 65534).

SEE ALSO

Fintro(3fml),
Falloc(3fml),
Finit(3fml),
Fielded(3fml),
Fsizeof(3fml),
Funused(3fml),
Fused(3fml)