bcopy(3C)
_________________________________________________________________
bcopy function
Copy bytes from one area to another.
_________________________________________________________________
Calling Sequence
int bcopy(), length;
char *source, *destination;
bcopy(source, destination, length);
where source is the start of the area to copy from.
destination is the start of the area to copy the
bytes to.
length is the number of bytes to move.
Description
The bcopy function copies the number of bytes that you specify
from one memory location to another; this function comes from the
University of California Berkeley UNIX (BSD) system. Unlike the
memcpy function, the bcopy function behaves well if the two areas
overlap. Also note that the source and destination arguments are
reversed as compared to memcpy's calling sequence.
Returns
The bcopy function returns no value.
Related Functions
See also the memcpy function.
Example
The following program copies a string into a buffer and then
prints it.
/* Program test for the bcopy() function */
#include <stdio.h>
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
bcopy(3C)
int bcopy();
char buffer[80];
main() {
bcopy("Copy string with bcopy.\n", buffer, 24);
fputs(buffer, stdout);
return 0;
}
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)