Sha256: 713a8d476697d815ac78e75e380cd329256e2fa6e8fc2cb727f1b5f40c784af2

Contents?: true

Size: 346 Bytes

Versions: 130

Compression:

Stored size: 346 Bytes

Contents

/* public domain rewrite of memcmp(3) */

#include <stddef.h>

void *
memmove(void *d, const void *s, size_t n)
{
    char *dst = (char *)d;
    const char *src = (const char *)s;

    if (src < dst) {
	src += n;
	dst += n;
	for (; n; --n)
	    *--dst = *--src;
    }
    else if (dst < src)
	for (; n; --n)
	    *dst++ = *src++;
    return d;
}

Version data entries

130 entries across 130 versions & 2 rubygems

Version Path
rhodes-2.0.0.beta1 platform/shared/ruby/missing/memmove.c
rhodes-1.5.4 platform/shared/ruby/missing/memmove.c
rhodes-1.5.3 platform/shared/ruby/missing/memmove.c
rhodes-1.5.2 platform/shared/ruby/missing/memmove.c
rhodes-1.5.1 platform/shared/ruby/missing/memmove.c
rhodes-1.5.0 platform/shared/ruby/missing/memmove.c
rhodes-1.4.2 platform/shared/ruby/missing/memmove.c
rhodes-1.4.1 platform/shared/ruby/missing/memmove.c
rhodes-1.4.0 platform/shared/ruby/missing/memmove.c
rhodes-1.2.2 platform/shared/ruby/missing/memmove.c