Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!usc!orion.oac.uci.edu!echarne From: echarne@orion.oac.uci.edu (Eli B. Charne) Newsgroups: comp.unix.questions Subject: Re: bcopy() bzero() Message-ID: <4601@orion.cf.uci.edu> Date: 10 Feb 90 22:13:34 GMT References: <11387@attctc.Dallas.TX.US> Distribution: usa Organization: University of California, Irvine Lines: 33 larryd1@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@ORION.OAC.UCI.EDU BITNET: echarne@UCI.BITNET