Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/string/bcopy.3
Show All 25 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)bcopy.3 8.1 (Berkeley) 6/4/93 | .\" @(#)bcopy.3 8.1 (Berkeley) 6/4/93 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd August 13, 2015 | .Dd August 14, 2015 | ||||
.Dt BCOPY 3 | .Dt BCOPY 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm bcopy | .Nm bcopy | ||||
.Nd copy byte string | .Nd copy byte string | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
Show All 9 Lines | |||||
bytes from string | bytes from string | ||||
.Fa src | .Fa src | ||||
to string | to string | ||||
.Fa dst . | .Fa dst . | ||||
The two strings may overlap. | The two strings may overlap. | ||||
If | If | ||||
.Fa len | .Fa len | ||||
is zero, no bytes are copied. | is zero, no bytes are copied. | ||||
.Pp | |||||
This function is obsolete (marked as LEGACY in | |||||
POSIX.1-2001): please use | |||||
.Xr memmove 3 | |||||
in new programs. | |||||
Note that | |||||
.Fn bcopy | |||||
takes its src and dst arguments in the opposite | |||||
order from | |||||
.Xr memmove 3 . | |||||
POSIX.1-2008 removes the specification of | |||||
.Fn bcopy . | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr memccpy 3 , | .Xr memccpy 3 , | ||||
.Xr memcpy 3 , | .Xr memcpy 3 , | ||||
.Xr memmove 3 , | .Xr memmove 3 , | ||||
.Xr strcpy 3 , | .Xr strcpy 3 , | ||||
.Xr strncpy 3 | .Xr strncpy 3 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
A | A | ||||
.Fn bcopy | .Fn bcopy | ||||
function appeared in | function appeared in | ||||
.Bx 4.2 . | .Bx 4.2 . | ||||
Its prototype existed previously in | Its prototype existed previously in | ||||
.In string.h | .In string.h | ||||
before it was moved to | before it was moved to | ||||
.In strings.h | .In strings.h | ||||
for | for | ||||
.St -p1003.1-2001 | .St -p1003.1-2001 | ||||
compliance. | compliance. | ||||
.Pp | |||||
The | |||||
wblock: Based on the previous sentence, this line should be removed (no "The" needed). | |||||
.St -p1003.1-2008 | |||||
removes the specification of | |||||
.Fn bcopy | |||||
and it is marked as LEGACY in | |||||
.St -p1003.1-2004 . | |||||
New programs should use | |||||
Not Done Inline ActionsNo colon needed here. wblock: No colon needed here. | |||||
Not Done Inline ActionsI meant remove the colon (:). And "New" should be capitalized: New programs should use wblock: I meant remove the colon (`:`). And "New" should be capitalized:
```New programs should use``` | |||||
Not Done Inline ActionsHere I kept the 'new' in lower case because the phrase didn't ends. araujo: Here I kept the 'new' in lower case because the phrase didn't ends. | |||||
Not Done Inline Actions@wblock is correct. The previous sentence should end with a period. New programs should use rodrigc: @wblock is correct. The previous sentence should end with a period.
The next sentence should… | |||||
.Xr memmove 3 . | |||||
If the input and output buffer do not overlap, then | |||||
Not Done Inline ActionsPlease avoid using "you", and this sentence is weird. The original has some trailing whitespace, too (please check with igor -R, which will check for those and other problems). Showing the suggested functions as .Xr references would be more helpful to the reader: New programs should use wblock: Please avoid using "you", and this sentence is weird. The original has some trailing… | |||||
.Xr memcpy 3 | |||||
is more efficient. | |||||
Not Done Inline Actions"would be" is passive and sounds unsure, I suggest changing it to "is" (active). is more efficient. wblock: "would be" is passive and sounds unsure, I suggest changing it to "is" (active).
```is more… | |||||
Note that | |||||
.Fn bcopy | |||||
takes | |||||
.Ar src | |||||
Not Done Inline Actionstakes .Ar src and .Ar dest in the wblock: ```
takes
.Ar src
and
.Ar dest
in the
``` | |||||
and | |||||
.Ar dst | |||||
in the opposite order from | |||||
.Fn memmove | |||||
and | |||||
.Fn memcpy . |
Based on the previous sentence, this line should be removed (no "The" needed).