Page MenuHomeFreeBSD

Make clear the bcopy(3) man page.
ClosedPublic

Authored by araujo on Aug 13 2015, 6:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 13, 12:36 AM
Unknown Object (File)
Sat, Apr 13, 12:34 AM
Unknown Object (File)
Sat, Apr 13, 12:33 AM
Unknown Object (File)
Fri, Apr 12, 1:06 PM
Unknown Object (File)
Wed, Apr 10, 7:57 PM
Unknown Object (File)
Jan 15 2024, 9:56 AM
Unknown Object (File)
Dec 22 2023, 3:02 PM
Unknown Object (File)
Dec 20 2023, 2:44 AM
Subscribers

Details

Summary

The IEEE Std 1003.1-2008 (``POSIX.1'') removes the specification of

bcopy() and it is marked as LEGACY in IEEE Std 1003.1-2004 (``POSIX.1'')
New programs should use: memmove() if you can guarantee that the input
and output buffer do not overlap, then memcpy() would be more efficient.
Note that bcopy() takes its src and dst arguments in the opposite order
from memcpy() and memmove().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

araujo retitled this revision from to Make clear the bcopy(3) man page, it is not obsolete..
araujo updated this object.
araujo edited the test plan for this revision. (Show Details)
araujo edited edge metadata.

Just sort memmove and memcpy.

araujo edited edge metadata.
araujo added a subscriber: theraven.

Add @theraven suggestions.
Discussed on src-committers@.

araujo retitled this revision from Make clear the bcopy(3) man page, it is not obsolete. to Make clear the bcopy(3) man page..Aug 13 2015, 8:09 AM
araujo updated this object.
araujo added reviewers: theraven, bapt, rodrigc.
araujo removed a subscriber: theraven.
araujo edited edge metadata.
araujo updated this object.

Just sort memmove and memcpy again.

bapt edited edge metadata.
wblock added inline comments.
lib/libc/string/bcopy.3
85 ↗(On Diff #7921)

No colon needed here.

87 ↗(On Diff #7921)

Please 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
.Xr memmove 3 .
If the input and output buffers do not overlap,
.Xr memcpy 3
is more efficient.

93 ↗(On Diff #7921)
takes
.Ar src
and
.Ar dest
in the
araujo edited edge metadata.

Address @wblock sugestions.
Also run:
igor -R
mandoc -Tlint

Thanks again @wblock.

lib/libc/string/bcopy.3
85 ↗(On Diff #7924)

I meant remove the colon (:). And "New" should be capitalized:

New programs should use
89 ↗(On Diff #7924)

"would be" is passive and sounds unsure, I suggest changing it to "is" (active).

is more efficient.
araujo edited edge metadata.

Update with @wblocks suggestions.

Note that: the 'new' is keep in lower case, because
it continues in the sentence.

lib/libc/string/bcopy.3
85 ↗(On Diff #7938)

Here I kept the 'new' in lower case because the phrase didn't ends.

lib/libc/string/bcopy.3
85 ↗(On Diff #7938)

@wblock is correct. The previous sentence should end with a period.
The next sentence should begin with new capitalized:

New programs should use
araujo edited edge metadata.

Capitalize 'New' and add a period in the end of POSIX sentence.

Thanks @rodrigc.

wblock added a reviewer: wblock.

One note on line 79, but otherwise looks good. Thank you!

lib/libc/string/bcopy.3
79 ↗(On Diff #7940)

Based on the previous sentence, this line should be removed (no "The" needed).

This revision is now accepted and ready to land.Aug 14 2015, 1:21 AM