NAME
filecopy, ffilecopy - copy an open file

SYNOPSIS
int filecopy (here,there);
int here,there;

#include <stdio.h>
int ffilecopy (here,there);
FILE *here,*there;

DESCRIPTION
Filecopy copies the open input file here to the open output file
there. The input data from the current file pointer of here until
EOF are appended after the current file pointer of there.

Ffilecopy copies the open buffered input file here to the open
buffered output file there. The input data from the current file
pointer of here until EOF are appended after the current file
pointer of there. The data currently in both buffers is correctly
handled, and both buffers are left in an appropriate state. After
ffilecopy, feof(here) will be true.

These routines are probably faster than you would care to code for
yourself, although they are quite simple.

DIAGNOSTICS
Filecopy and ffilecopy return 0 normally, -1 on error. If an error
occurs, the file copying operation may be incomplete.

SEE ALSO
rename(2)