* *.[hc]: add Emacs magic at the end of file, to ensure GNU
[bpt/guile.git] / libguile / memmove.c
1 /* Wrapper to implement ANSI C's memmove using BSD's bcopy. */
2 /* This function is in the public domain. --Per Bothner. */
3
4 /* Software engineering face-lift by Greg J. Badros, 11-Dec-1999,
5 gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */
6
7 #include <sys/types.h>
8
9 #ifdef __STDC__
10 #define PTR void *
11 #define CPTR const void *
12 PTR memmove (PTR, CPTR, size_t);
13 #else
14 #define PTR char *
15 #define CPTR char *
16 PTR memmove ();
17 #endif
18
19 PTR
20 memmove (PTR s1, CPTR s2, size_t n)
21 {
22 bcopy (s2, s1, n);
23 return s1;
24 }
25
26 /*
27 Local Variables:
28 c-file-style: "gnu"
29 End:
30 */