2006-06-15 18:02:20 +02:00
|
|
|
#include "types.h"
|
|
|
|
#include "defs.h"
|
|
|
|
|
2006-06-12 17:22:12 +02:00
|
|
|
void *
|
|
|
|
memcpy(void *dst, void *src, unsigned n)
|
|
|
|
{
|
|
|
|
char *d = (char *) dst;
|
|
|
|
char *s = (char *) src;
|
|
|
|
|
|
|
|
while(n-- > 0)
|
|
|
|
*d++ = *s++;
|
|
|
|
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
void *
|
|
|
|
memset(void *dst, int c, unsigned n)
|
|
|
|
{
|
|
|
|
char *d = (char *) dst;
|
|
|
|
|
|
|
|
while(n-- > 0)
|
|
|
|
*d++ = c;
|
|
|
|
|
|
|
|
return dst;
|
|
|
|
}
|