1 /*
2 Copyright (c) 1994 Cygnus Support.
3 All rights reserved.
4
5 Redistribution and use in source and binary forms are permitted
6 provided that the above copyright notice and this paragraph are
7 duplicated in all such forms and that any documentation,
8 and/or other materials related to such
9 distribution and use acknowledge that the software was developed
10 at Cygnus Support, Inc. Cygnus Support, Inc. may not be used to
11 endorse or promote products derived from this software without
12 specific prior written permission.
13 THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16 */
17 /*
18 FUNCTION
19 <<bcopy>>---copy memory regions
20
21 SYNOPSIS
22 #include <strings.h>
23 void bcopy(const void *<[in]>, void *<[out]>, size_t <[n]>);
24
25 DESCRIPTION
26 This function copies <[n]> bytes from the memory region
27 pointed to by <[in]> to the memory region pointed to by
28 <[out]>.
29
30 This function is implemented in term of <<memmove>>.
31
32 PORTABILITY
33 <<bcopy>> requires no supporting OS subroutines.
34
35 QUICKREF
36 bcopy - pure
37 */
38
39 #include <string.h>
40 #include <strings.h>
41
42 #undef bcopy
43
44 void
bcopy(const void * b1,void * b2,size_t length)45 bcopy (const void *b1,
46 void *b2,
47 size_t length)
48 {
49 memmove (b2, b1, length);
50 }
51