From: utzoo!decvax!ucbvax!ucbcad:tektronix!zehntel!sytek!menlo70!hao!seismo!rlgvax!guy Newsgroups: net.unix-wizards Title: Re: dir.h Article-I.D.: rlgvax.152 Posted: Sun Mar 27 19:39:22 1983 Received: Thu Mar 31 01:02:38 1983 References: sri-arpa.678 1) Yes, it's a minor nuisance, but it doesn't take much code to get around. "strncpy"ing the name to a 14+1 character buffer and setting buffer[14] to '\0' will suffice. 2) 4.2BSD has a different directory structure. The people who did it point out that there should really be a standard library routine to read directories, pass over empty entries, etc., so that only one small piece of code in the system knows about directory formats. It could return a structure containing an I-number and a null-terminated entry name; the exact format (size of I-number and entry name) would be system-dependent. That way, code could be written to port to versions of UNIX with different directory structures, and even to some non-UNIX operating systems that are gracious enough to let user programs read directories. Unfortunately, only 4.2BSD systems (and systems which have received the V7/32V/4.1BSD/USG UNIX versions of these routines and installed them) have these routines. Still, even if you don't have them you can write your own, and thus would only have to solve this problem once. Guy Harris RLG Corporation seismo!rlgvax!guy