~mingw-w64/mingw-w64/experimental

« back to all changes in this revision

Viewing changes to ironcrate/string/memcpy.c

  • Committer: ktietz70
  • Date: 2009-12-07 19:49:25 UTC
  • Revision ID: svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:experimental:1611
Rename to iCrt (ironCrate)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <w64crt.h>
 
2
#include <w64string.h>
 
3
 
 
4
void *
 
5
memcpy (void *d, const void *s, size_t n)
 
6
{
 
7
  const char *sc, *se;
 
8
  char *dc;
 
9
 
 
10
  dc = (char *) d;
 
11
  sc = (const char *) s;
 
12
  se = sc + n;
 
13
 
 
14
  if (se != sc)
 
15
    {
 
16
      do {
 
17
       *dc++ = *sc++;
 
18
      } while (sc < se);
 
19
    }
 
20
  return d;
 
21
}
 
22