log
graph
tags
bookmarks
branches
changeset
browse
file
latest
diff
comparison
annotate
file log
raw
help
Mercurial
>
hg
>
CbC
>
CbC_gcc
annotate libgcc/memcpy.c @ 111:
04ced10e8804
Find changesets by keywords (author, files, the commit message), revision number or hash, or
revset expression
.
gcc 7
author
kono
date
Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes -
Everywhere:
Within whitespace:
At end of lines:
rev
line source
111
04ced10e8804
gcc 7
kono
parents:
diff
changeset
1
/* Public domain. */
04ced10e8804
gcc 7
kono
parents:
diff
changeset
2
#include <stddef.h>
04ced10e8804
gcc 7
kono
parents:
diff
changeset
3
04ced10e8804
gcc 7
kono
parents:
diff
changeset
4
void *
04ced10e8804
gcc 7
kono
parents:
diff
changeset
5
memcpy (void *dest, const void *src, size_t len)
04ced10e8804
gcc 7
kono
parents:
diff
changeset
6
{
04ced10e8804
gcc 7
kono
parents:
diff
changeset
7
char *d = dest;
04ced10e8804
gcc 7
kono
parents:
diff
changeset
8
const char *s = src;
04ced10e8804
gcc 7
kono
parents:
diff
changeset
9
while (len--)
04ced10e8804
gcc 7
kono
parents:
diff
changeset
10
*d++ = *s++;
04ced10e8804
gcc 7
kono
parents:
diff
changeset
11
return dest;
04ced10e8804
gcc 7
kono
parents:
diff
changeset
12
}