projects
/
rpikern
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
more debugging, and serial port
[rpikern]
/
src
/
libc
/
string.c
1
#include "string.h"
2
3
void *memset(void *ptr, int val, int size)
4
{
5
unsigned char *p = ptr;
6
while(size--) {
7
*p++ = val;
8
}
9
return ptr;
10
}
11
12
void *memcpy(void *dest, void *src, int size)
13
{
14
unsigned char *d = dest;
15
unsigned char *s = src;
16
while(size--) {
17
*d++ = *s++;
18
}
19
return dest;
20
}