C言語なら俺に聞け(入門編)Part 101
レス数が950を超えています。1000を超えると書き込みができなくなります。
0983デフォルトの名無しさん
2012/05/30(水) 12:16:27.50#include <stdio.h>
#include <string.h>
#include <sys/types.h>
void pattcpy(void* dst, void* src, u_int byte_size, u_int src_len,
u_int* pattern, u_int pattern_len)
{
u_int src_index = 0;
u_int pattern_index = 0;
while (src_index < src_len) {
if (pattern[pattern_index] != 0) {
memcpy(dst, src, byte_size);
dst += byte_size;
}
pattern_index++;
if (pattern_index >= pattern_len)
pattern_index = 0;
src += byte_size;
src_index++;
}
}
レス数が950を超えています。1000を超えると書き込みができなくなります。