home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!murphy!gregb
- From: gregb@murphy.com (Greg Banschbach (Unigroup of New York))
- Subject: Re: Memory functions - memcpy & memmove
- Message-ID: <BxtE16.2HG@murphy.com>
- Organization: Murphy & Durieu, NYC NY, USA
- References: <1992Nov10.162211.7073@atlastele.com>
- Date: Mon, 16 Nov 1992 15:07:53 GMT
- Lines: 38
-
- In <BxArt0.9pE@murphy.com>, I wrote a question which got this
- reply, which seems to work, AND in addition tells me I need
- to look at some of the B-tree node / leaf routines to find the
- root of my problem:
-
- THANKS VERY MUCH FOR ALL OF THE RESPONSES......
-
- From adam.MIT.EDU!scs Sat Nov 7 23:14:03 1992
- From: scs@adam.mit.edu (Steve Summit)
- To: gregb@murphy.com
- Subject: Re: Memory functions - memcpy & memmove
-
- In <BxArt0.9pE@murphy.com>, you wrote:
-
- > Has anyone written a function which would exactly mimic
- > memmove ?
-
- Here's the one I use on systems without it:
-
- memmove(dest, src, len)
- register char *dest, *src;
- register int len;
- {
- if(src < dest)
- {
- src += len;
- dest += len;
- while(len-- > 0)
- *--dest = *--src;
- }
- else while(len-- > 0)
- *dest++ = *src++;
- }
-
- Steve Summit
- scs@adam.mit.edu
-
-
-