bool Testwriteaccess(fn)
char *fn;
{
int f;
f = creat(fn,0666); /* we try to create a new file, because
simply testing write access with access(fn,W_OK)
will fail when the file doesn't exist */
if (f >= 0) {
close(f); return TRUE;
} else return FALSE;
}
int Flength(FDR filep)
{
register FILE *iop; /* stdio-style FILE pointer */
register long pos; /* current file position */
register int len; /* the file length */