strncpy()

tll at druxu.UUCP tll at druxu.UUCP
Sat Aug 20 07:56:54 AEST 1983


One place where strncpy's behavior is desirable is in dealing with UNIX*
directory entries.  A directory entry contains a 14-character array for
the filename, which is padded with nulls.  It is only null-terminated
if the filename is less than 14 characters long.

			Tom Laidig

* UNIX is a trademark of some subsidiary of AT&T, which may have almost
  any name or logo, depending on the date nad Judge Greene's mood.



More information about the Comp.lang.c mailing list