Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!tektronix!tekmdp!bronze!stevesu From: stevesu@bronze.UUCP (Steve Summit) Newsgroups: net.lang.c,net.unix-wizar Subject: Re: strncpy() Message-ID: <716@bronze.UUCP> Date: Wed, 31-Aug-83 03:59:16 EDT Article-I.D.: bronze.716 Posted: Wed Aug 31 03:59:16 1983 Date-Received: Thu, 1-Sep-83 02:25:59 EDT References: druxu.677 Lines: 14 (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