Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (19 sloc) 0.372 kb
/* public domain rewrite of memcmp(3) */
#include "ruby/missing.h"
#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;
Jump to Line
Something went wrong with that request. Please try again.