NAME

cat_truncatefile - truncate an open writeable file.

SYNOPSIS

#include <cat/catutil.h>

int cat_truncatefile(FILE *f, unsigned long len);

DESCRIPTION

This function sets to length len the length of an open, writeable file pointed to by the file pointer f.

RETURN VALUES

Returns zero if successful or a negative code on error.

SEE ALSO

cat, catutil, cat_filelength, cat_filetime, cat_getfile, cat_lockfile, cat_lockfile, cat_unlockfile