PURPOSE

Fupdate, Fupdate32 - update destination buffer with source

SYNOPSIS


#include <stdio.h>
#include "fml.h"
int
Fupdate(FBFR *dest, FBFR *src)
#include "fml32.h"
int
Fupdate32(FBFR32 *dest, FBFR32 *src)

DESCRIPTION

Fupdate() updates the destination buffer with the field values in the source buffer. dest and src are pointers to fielded buffers. For fields that match on fieldid/occurrence, the field value is updated in the destination buffer with the value in the source buffer. Fields in the destination buffer that have no corresponding field in the source buffer are left untouched. Fields in the source buffer that have no corresponding field in the destination buffer are added to the destination buffer.

Fupdate32 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, Fupdate() fails and sets Ferror to:

[FALIGNERR]
"fielded buffer not aligned"
Either the source buffer or the destination buffer does
not begin on the proper boundary.
[FNOTFLD]
"buffer not fielded"
The source or destination buffer is not a fielded buffer or has not been initialized by Finit().
 
[FNOSPACE]
"no space in fielded buffer"
A field value is to be added or changed in the destination buffer but there is not enough space remaining in the buffer.

SEE ALSO

Fintro(3fml),
Fjoin(3fml),
Fojoin(3fml),
Fproj(3fml),
Fprojcpy(3fml)