>Note that this scores near zero in the portability department; I don't >know what SVR4 does but would expect it to have the BSD ftruncate. S5R4's "native" interface for doing that is the F_FREESP "fcntl" call. "truncate()" and "ftruncate()" exist in the standard library as wrappers around that "fcntl()".