cat_truncatefile - truncate an open writeable file.
#include <cat/catutil.h>
int cat_truncatefile(FILE *f, unsigned long len);
This function sets to length len the length of an open, writeable file pointed to by the file pointer f.
Returns zero if successful or a negative code on error.
cat, catutil, cat_filelength, cat_filetime,
cat_getfile, cat_lockfile, cat_lockfile,
cat_unlockfile