bcopy() bzero()
Eli B. Charne
echarne at orion.oac.uci.edu
Sun Feb 11 09:13:34 AEST 1990
larryd1 at attctc.Dallas.TX.US (Larry Clark) writes:
> I'm porting sources from the bsd world into a Sys V environment
> and need an explanation of bcopy() and bzero(). Would someone
> in a bsd environment explain the parameters of each call and
> possibly map them to memcpy() and memset()?
Well, here's how bcopy and bzero work:
bcopy(b1, b2, length)
char *b1, *b2;
unsigned int length;
bcopy() Copies length bytes from the "string" b1, and copies them into
string b2. I was under the impression this was exactly what memcpy()
does, but perhaps the order of arguments is changed.
bzero(b, length)
char *b;
unsigned int length;
bzero() just sets length bytes pointed to by b, to the value zero.
Hope this helps
-Eli
--
--------
Eli B. Charne INTERNET: echarne at ORION.OAC.UCI.EDU
BITNET: echarne at UCI.BITNET
More information about the Comp.unix.questions
mailing list