From owner-freebsd-questions Thu May 16 4:10:16 2002 Delivered-To: freebsd-questions@freebsd.org Received: from oxe.cs.umu.se (oxe.cs.umu.se [130.239.40.14]) by hub.freebsd.org (Postfix) with ESMTP id E74C437B406 for ; Thu, 16 May 2002 04:10:11 -0700 (PDT) Received: from gren.cs.umu.se (rfc1413 says tdv94ped@gren.cs.umu.se [130.239.40.187]) by oxe.cs.umu.se (8.8.8/8.8.8) with ESMTP id NAA21845; Thu, 16 May 2002 13:09:48 +0200 (MET DST) Date: Thu, 16 May 2002 13:09:48 +0200 (MEST) From: Paul Everlund To: shubhamr Cc: "questions@FreeBSD.ORG" Subject: Re: system memory copy? In-Reply-To: <3CE38EF2.54AA90EC@malkauns.nsc.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 16 May 2002, shubhamr wrote: > to copy byte by byte into system memory/buffers,which routine must I > use. > bcopy and memcpy are for string copying,right?Can I use the same? > > Thanks in advance > shubha As a string is made up as a vector of chars, and a char is one byte, you should be able to use either function, bcopy or memcpy, to do byte copies. memcpy seems to use bcopy, and with bcopy you can copy strings that overlap, also memcpy seems to be able to do this. Read 'man 3 bcopy' and 'man 3 memcpy' for more information, which I suppose you already have done. :-) Good luck! Best regards, Paul To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message