bcopy(3C) DG/UX 4.30 bcopy(3C)
NAME
bcopy - Copy bytes from one area to another.
SYNOPSIS
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.
SEE ALSO
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>
int bcopy();
char buffer[80];
main() {
bcopy("Copy string with bcopy.\n", buffer, 24);
fputs(buffer, stdout);
return 0;
}
Licensed material--property of copyright holder(s) Page 1