Lines Matching refs:newfn
270 static int compare_file(const char *outfn, const char *newfn)
279 new_f = fopen(newfn, "r");
309 char *outfn = NULL, *newfn = NULL;
350 newfn = (char *) malloc(strlen(outfn)+20);
351 if (!newfn) {
355 strcpy(newfn, outfn);
356 strcat(newfn, ".new");
357 out = fopen(newfn, "w");
359 perror(newfn);
377 if (compare_file(outfn, newfn)) {
390 unlink(newfn);
394 rename(newfn, outfn);