PURPOSE

Fdelete, Fdelete32 - delete list of fields from buffer

SYNOPSIS

#include <stdio.h>
#include "fml.h"
int
Fdelete(FBFR *fbfr, FLDID *fieldid)
#include "fml32.h"
int
Fdelete32(FBFR32 *fbfr, FLDID32 *fieldid)

DESCRIPTION

Fdelete() deletes all occurrences of all fields listed in the array of field identifiers, fieldid[]. The last entry in the array must be BADFLDID. fbfr is a pointer to a fielded buffer. fieldid is a pointer to an array of field identifiers. This is a more efficient way of deleting several fields from a buffer instead of using several Fdelall() calls. The update is done in-place. The array of field identifiers may be re-arranged by Fdelete()(they are sorted, if not already, in numeric order).

Fdelete() returns success even if no fields are deleted from the fielded buffer.

Fdelete32 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, Fdelete() 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.

SEE ALSO

Fintro(3fml),
Fdel(3fml),
Fdelall(3fml)