38 infp = fopen(infile,
"r");
40 G_warning(
"Cannot open %s for reading: %s", infile, strerror(errno));
44 outfp = fopen(outfile,
"w");
46 G_warning(
"Cannot open %s for writing: %s", outfile, strerror(errno));
51 while ((inchar = getc(infp)) != EOF) {
54 outchar = putc(inchar, outfp);
55 if (outchar != inchar) {
56 G_warning(
"Error writing to %s", outfile);
int G_copy_file(const char *infile, const char *outfile)
Copies one file to another.
void G_warning(const char *,...) __attribute__((format(printf