ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

memmove.c
Go to the documentation of this file.
00001 #include <string.h>
00002 
00003 /* NOTE: This code is duplicated in memcpy function */
00004 void * memmove(void *dest,const void *src,size_t count)
00005 {
00006     char *char_dest = (char *)dest;
00007     char *char_src = (char *)src;
00008 
00009     if ((char_dest <= char_src) || (char_dest >= (char_src+count)))
00010     {
00011         /*  non-overlapping buffers */
00012         while(count > 0)
00013     {
00014             *char_dest = *char_src;
00015             char_dest++;
00016             char_src++;
00017             count--;
00018     }
00019     }
00020     else
00021     {
00022         /* overlaping buffers */
00023         char_dest = (char *)dest + count - 1;
00024         char_src = (char *)src + count - 1;
00025 
00026         while(count > 0)
00027     {
00028            *char_dest = *char_src;
00029            char_dest--;
00030            char_src--;
00031            count--;
00032     }
00033     }
00034 
00035     return dest;
00036 }

Generated on Sun May 27 2012 04:36:29 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.