Tony Hoyle writes [using very long lines]: > > Windows will return the correct length (ie. file size - number of linefeeds) for >fstat > from text files. On any system which doesn't this is irrelevant, since the return >from statbuf is > only used once and it will simply alloc/read too many bytes - the read returns the > number of actual bytes read, and the function behaves correctly. Like I said, it's not that simple. There's no guarantee that the file size returned by fstat for a text file has any relation whatsoever to the number of bytes you can actually read from the file. In particular, a record-oriented file system may have to *add* newlines at the record boundaries, making the actual size larger, not smaller. Some parts of CVS are very careful to do things by the book (i.e., the ANSI/ISO C Standard), other parts are cavalier to the point of recklessness. Guess which one this is. :-) -Larry Jones I sure wish I could get my hands on some REAL dynamite. -- Calvin