blob: ed83ef19e59e8d8f1860a67e303d64157ee8f852 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "memory.h"
void *rawmemccpy(void *restrict dest, void const *restrict src, int value)
{
unsigned char *restrict destination = dest;
unsigned char const *restrict source = src;
size_t i = 0;
for (i = 0;; i++) {
destination[i] = source[i];
if (destination[i] == (unsigned char)value)
return &destination[i + 1];
}
}
|