Home | History | Annotate | Download | only in util

Lines Matching full:outfn

270 static int compare_file(const char *outfn, const char *newfn)
276 old_f = fopen(outfn, "r");
309 char *outfn = NULL, *newfn = NULL;
349 outfn = argv[optind];
350 newfn = (char *) malloc(strlen(outfn)+20);
355 strcpy(newfn, outfn);
364 outfn = 0;
375 if (outfn) {
377 if (compare_file(outfn, newfn)) {
379 printf("No change, keeping %s.\n", outfn);
381 if (stat(outfn, &stbuf) == 0) {
383 printf("Updating modtime for %s\n", outfn);
386 if (utime(outfn, &ut) < 0)
393 printf("Creating or replacing %s.\n", outfn);
394 rename(newfn, outfn);
397 if (stat(outfn, &st) == 0)
398 chmod(outfn, st.st_mode & ~0222);