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));
52 while ((inchar = getc(infp)) != EOF) {
55 outchar = putc(inchar, outfp);
56 if (outchar != inchar) {
57 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