39 infp = fopen(infile,
"r");
41 G_warning(
"Cannot open %s for reading: %s", infile, strerror(errno));
45 outfp = fopen(outfile,
"w");
47 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