diff options
Diffstat (limited to 'contrib/texinfo/libtxi/memcpy.c')
-rw-r--r-- | contrib/texinfo/libtxi/memcpy.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/texinfo/libtxi/memcpy.c b/contrib/texinfo/libtxi/memcpy.c new file mode 100644 index 000000000000..521625464cdd --- /dev/null +++ b/contrib/texinfo/libtxi/memcpy.c @@ -0,0 +1,20 @@ +/* Copy LEN bytes starting at SRCADDR to DESTADDR. Result undefined + if the source overlaps with the destination. + Return DESTADDR. */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +char * +memcpy (destaddr, srcaddr, len) + char *destaddr; + const char *srcaddr; + int len; +{ + char *dest = destaddr; + + while (len-- > 0) + *destaddr++ = *srcaddr++; + return dest; +} |