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-5.5.18 platform/shared/ruby/missing/memmove.c
rhodes-5.5.17 platform/shared/ruby/missing/memmove.c
rhodes-5.5.15 platform/shared/ruby/missing/memmove.c
rhodes-5.5.0.22 platform/shared/ruby/missing/memmove.c
rhodes-5.5.2 platform/shared/ruby/missing/memmove.c
rhodes-5.5.0.7 platform/shared/ruby/missing/memmove.c
rhodes-5.5.0.3 platform/shared/ruby/missing/memmove.c
rhodes-5.5.0 platform/shared/ruby/missing/memmove.c
tauplatform-1.0.3 platform/shared/ruby/missing/memmove.c
tauplatform-1.0.2 platform/shared/ruby/missing/memmove.c
tauplatform-1.0.1 platform/shared/ruby/missing/memmove.c
rhodes-3.5.1.12 platform/shared/ruby/missing/memmove.c
rhodes-3.3.5 platform/shared/ruby/missing/memmove.c
rhodes-3.4.2 platform/shared/ruby/missing/memmove.c
rhodes-3.3.4 platform/shared/ruby/missing/memmove.c
rhodes-3.3.3 platform/shared/ruby/missing/memmove.c
rhodes-3.3.3.beta.4 platform/shared/ruby/missing/memmove.c
rhodes-3.3.3.beta.3 platform/shared/ruby/missing/memmove.c
rhodes-3.3.3.beta.2 platform/shared/ruby/missing/memmove.c
rhodes-3.3.3.beta.1 platform/shared/ruby/missing/memmove.c