|
|
Fmove, Fmove32(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() is that Fcpy() 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() bytes of data from the source fielded buffer to the target buffer. The destination buffer must be aligned on a short boundary.
For values of type FLD_PTR, Fmove32() transfers the buffer pointer. The application programmer must manage the reallocation and freeing of buffers when the associated pointer is moved.
Fmove32() is used with 32-bit FML.
A thread in a multithreaded application may issue a call to Fmove() or Fmove32() while running in any context state, including TPINVALIDCONTEXT.
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:
The source or destination buffer does not begin on the proper boundary.
The source buffer is not a fielded buffer or has not been initialized by Finit().
See Also
Introduction to FML Functions, Fcpy, Fcpy32(3fml), Fsizeof, Fsizeof32(3fml)
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|