Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/string/bcopy.3
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 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: | |||||
wblockUnsubmitted 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… | |||||
.Fn memmove | |||||
if you can guarantee that the input and output buffer | |||||
wblockUnsubmitted 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… | |||||
do not overlap, then | |||||
.Fn memcpy | |||||
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… | |||||
would be more efficient. | |||||
Note that | |||||
.Fn bcopy | |||||
takes its src and dst arguments in the | |||||
wblockUnsubmitted Not Done Inline Actionstakes .Ar src and .Ar dest in the wblock: ```
takes
.Ar src
and
.Ar dest
in the
``` | |||||
opposite order from | |||||
.Fn memmove | |||||
and | |||||
.Fn memcpy . |
Based on the previous sentence, this line should be removed (no "The" needed).