2007年7月16日星期一

bcopy

bcopy

The Open Group Base Specifications Issue 6
IEEE Std 1003.1, 2004 Edition
Copyright © 2001-2004 The IEEE and The Open Group, All Rights reserved.

NAME

bcopy - memory operations (LEGACY)

SYNOPSIS

[XSI] [Option Start] #include < strings.h>

void bcopy(const void *
s1, void *s2, size_t n); [Option End]

DESCRIPTION

The bcopy() function shall copy n bytes from the area pointed to by s1 to the area pointed to by s2.

The bytes are copied correctly even if the area pointed to by s1 overlaps the area pointed to by s2.

RETURN VALUE

The bcopy() function shall not return a value.

ERRORS

No errors are defined.


The following sections are informative.

EXAMPLES

None.

APPLICATION USAGE

The memmove() function is preferred over this function.

The following are approximately equivalent (note the order of the arguments):

bcopy(s1,s2,n) ˜= memmove(s2,s1,n)

For maximum portability, it is recommended to replace the function call to bcopy() as follows:

#define bcopy(b1,b2,len) (memmove((b2), (b1), (len)), (void) 0)

RATIONALE

None.

FUTURE DIRECTIONS

This function may be withdrawn in a future version.

SEE ALSO

memmove(), the Base Definitions volume of IEEE Std 1003.1-2001 , <strings.h>

CHANGE HISTORY

First released in Issue 4, Version 2.

Issue 5

Moved from X/OPEN UNIX extension to BASE.

Issue 6

This function is marked LEGACY.

End of informative text.

UNIX ® is a registered Trademark of The Open Group.
POSIX ® is a registered Trademark of The IEEE.
[ Main Index | XBD | XCU | XSH | XRAT ]

没有评论: