[net.unix-wizar] strncpy

stevesu@bronze.UUCP (Steve Summit) (08/31/83)

(Tom Laidig pointed out that the sometimes peculiar behavior of
strncpy(), i.e. not always appending a '\0', is useful in strings
that need not be null terminated, like filenames in directories.)

By the way, that reminds me of a tidbit I learned while building
directories by hand (I was salvaging a trashed filesystem, and it
was PAINFUL): 

Those filenames that are shorter than DIRSIZE (14) characters
should be fully null padded.  The kernel must not use the strncmp()
I'm used to, because if there are characters other than '\0'
after the first '\0', it won't match.

					Steve Summit