strcpy

Pablo Halpern pablo at polygen.uucp
Sat Apr 2 07:08:41 AEST 1988


>From article <725 at xyzzy.UUCP>, by throopw at xyzzy.UUCP (Wayne A. Throop):
> [ Refering to the manual entry for strcpy() ]
> I'm fairly certain that the only thing the phrasing of the manual
> guarantees, (or even is intended to guarantee)) is that the null is
> copied during the process, and not what the relative order is.

Fine.  To avoid incorrect inferences from readers, the entry should
be revised to just say that the copy INCLUDES the NUL terminator.
Also, since the length of the destination array cannot be determined
by strcpy() (because of C's array/pointer semantics), the manual entry
should explicitely state that no characters in the desination string
following the NUL are modified.  (Again, considering the array/pointer
semantics, perhaps someone could come up with an even more precise
rewording of my last sentence.)

Pablo Halpern		|	mit-eddie \
Polygen Corp.		|	princeton  \ !polygen!pablo  (UUCP)
200 Fifth Ave.		|	bu-cs      /
Waltham, MA 02254	|	stellar   /



More information about the Comp.lang.c mailing list