bcopy

John P. Nelson jpn at genrad.com
Sat Dec 10 01:51:35 AEST 1988


>What does the following mean?  [What should it do?]
    [ Examples of the use of "bcopy" with overlapping regions deleted ]

Considering that "bcopy" is not part of the ANSI standard, bcopy's behavior
is not standardized.  I would have to say that each vendor's implementation
of bcopy is free to handle overlapping strings or not, depending on their
preference.  If the BSD 4.3 bcopy manual page doesn't explicitly say it
handles overlapping copies, then you can't count on it.

I would recommend the use of the the new ANSI standarized functions:
"memcpy", which is guaranteed to be fast, and "memmove" which is
guaranteed to work with overlapping regions.

     john nelson

UUCP:	{decvax,mit-eddie}!genrad!teddy!jpn
smail:	jpn at teddy.genrad.com



More information about the Comp.std.c mailing list