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

Fmove (3FML)

Fmove (3FML)

Name

Fmove, Fmove32-move fielded buffer to destination

Synopsis

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

int
Fmove(char *dest, FBFR *src)

#include "fml32.h"

int
Fmove32(char *dest, FBFR32 *src)

Description

Fmove() should be used when copying from a fielded buffer to any type of buffer. dest and src are pointers to the destination buffer and the source fielded buffers respectively.

The difference between Fmove() and Fcpy(3) is that Fcpy(3) expects the destination to be a fielded buffer and thus can make sure it is of sufficient size to accommodate the data from the source buffer. Fmove() makes no such check, blindly moving Fsizeof(3) bytes of data from the source fielded buffer to the target buffer. The destination buffer must be aligned on a short boundary.

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

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

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

See Also

Fintro(3), Fcpy(3), Fsizeof(3)



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