Home | History | Annotate | Download | only in time

Lines Matching refs:tempname

656    remove TEMPNAME if nonnull, and then exit.  */
659 char const *tempname)
670 if (tempname)
671 remove(tempname);
1370 /* Prepare to write to the file *OUTNAME, using *TEMPNAME to store the
1373 *TEMPNAME. If *TEMPNAME is null, allocate the name of any such
1374 temporary file; otherwise, reuse *TEMPNAME's storage, which is
1377 open_outfile(char const **outname, char **tempname)
1387 if (!*tempname)
1388 random_dirent(outname, tempname);
1396 random_dirent(outname, tempname);
1408 /* If TEMPNAME, the result is in the temporary file TEMPNAME even
1409 though the user wanted it in NAME, so rename TEMPNAME to NAME.
1410 Report an error and exit if there is trouble. Also, free TEMPNAME. */
1412 rename_dest(char *tempname, char const *name)
1414 if (tempname) {
1415 if (rename(tempname, name) != 0) {
1417 remove(tempname);
1423 free(tempname);
1486 char *tempname = NULL;
1534 staysymlink &= !tempname;
1535 random_dirent(&outname, &tempname);
1563 random_dirent(&outname, &tempname);
1586 tp = open_outfile(&outname, &tempname);
1589 close_file(tp, directory, linkname, tempname);
1601 rename_dest(tempname, linkname);
2428 char *tempname = NULL;
2542 fp = open_outfile(&outname, &tempname);
2825 close_file(fp, directory, name, tempname);
2826 rename_dest(tempname, name);