8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:43:03 +01:00
firebird-mirror/extern/regex/fake/memmove.c
2005-05-27 22:45:31 +00:00

27 lines
411 B
C

#include <stdio.h>
#include <string.h>
#include <sys/types.h>
/*
- memmove - fake ANSI C routine
*/
char *
memmove(dst, src, count)
char *dst;
char *src;
size_t count;
{
register char *s;
register char *d;
register size_t n;
if (dst > src)
for (d = dst+count, s = src+count, n = count; n > 0; n--)
*--d = *--s;
else
for (d = dst, s = src, n = count; n > 0; n--)
*d++ = *s++;
return(dst);
}