1BCOPY(3P) POSIX Programmer's Manual BCOPY(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 bcopy - memory operations (LEGACY)
13
15 #include <strings.h>
16
17 void bcopy(const void *s1, void *s2, size_t n);
18
19
21 The bcopy() function shall copy n bytes from the area pointed to by s1
22 to the area pointed to by s2.
23
24 The bytes are copied correctly even if the area pointed to by s1 over‐
25 laps the area pointed to by s2.
26
28 The bcopy() function shall not return a value.
29
31 No errors are defined.
32
33 The following sections are informative.
34
36 None.
37
39 The memmove() function is preferred over this function.
40
41 The following are approximately equivalent (note the order of the argu‐
42 ments):
43
44
45 bcopy(s1,s2,n) ~= memmove(s2,s1,n)
46
47 For maximum portability, it is recommended to replace the function call
48 to bcopy() as follows:
49
50
51 #define bcopy(b1,b2,len) (memmove((b2), (b1), (len)), (void) 0)
52
54 None.
55
57 This function may be withdrawn in a future version.
58
60 memmove(), the Base Definitions volume of IEEE Std 1003.1-2001,
61 <strings.h>
62
64 Portions of this text are reprinted and reproduced in electronic form
65 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
66 -- Portable Operating System Interface (POSIX), The Open Group Base
67 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
68 Electrical and Electronics Engineers, Inc and The Open Group. In the
69 event of any discrepancy between this version and the original IEEE and
70 The Open Group Standard, the original IEEE and The Open Group Standard
71 is the referee document. The original Standard can be obtained online
72 at http://www.opengroup.org/unix/online.html .
73
74
75
76IEEE/The Open Group 2003 BCOPY(3P)