Lines Matching full:temp

16 static int checkout_file PROTO((char *file, char *temp));
18 static void rename_rcsfile PROTO((char *temp, char *real));
21 static void rename_dbmfile PROTO((char *temp));
22 static void write_dbmfile PROTO((char *temp));
387 char *temp; local
409 temp = make_tempfile ();
410 switch (checkout_file (CVSROOTADM_MODULES, temp))
416 if ((db = dbm_open (temp, O_RDONLY, 0666)) != NULL)
419 write_dbmfile (temp);
420 rename_dbmfile (temp);
422 rename_rcsfile (temp, CVSROOTADM_MODULES);
432 if (unlink_file (temp) < 0
434 error (0, errno, "cannot remove %s", temp);
435 free (temp);
441 temp = make_tempfile ();
442 if (checkout_file (fileptr->filename, temp) == 0)
443 rename_rcsfile (temp, fileptr->filename);
455 if (unlink_file (temp) < 0
457 error (0, errno, "cannot remove %s", temp);
458 free (temp);
490 temp = make_tempfile ();
491 if (checkout_file (fname, temp) == 0)
493 rename_rcsfile (temp, fname);
504 if (unlink_file (temp) < 0
506 error (0, errno, "cannot remove %s", temp);
507 free (temp);
538 char *temp; in make_tempfile() local
542 temp = xmalloc (sizeof (BAKPREFIX) + 40); in make_tempfile()
545 (void) sprintf (temp, "%s%d", BAKPREFIX, seed++); in make_tempfile()
546 if ((fd = CVS_OPEN (temp, O_CREAT|O_EXCL|O_RDWR, 0666)) != -1) in make_tempfile()
549 error (1, errno, "cannot create temporary file %s", temp); in make_tempfile()
552 error(1, errno, "cannot close temporary file %s", temp); in make_tempfile()
553 return temp; in make_tempfile()
561 checkout_file (file, temp) in checkout_file() argument
563 char *temp;
581 retcode = RCS_checkout (rcsnode, NULL, NULL, NULL, NULL, temp,
598 write_dbmfile (temp) in write_dbmfile() argument
599 char *temp; in write_dbmfile()
608 fp = open_file (temp, "r");
609 if ((db = dbm_open (temp, O_RDWR | O_CREAT | O_TRUNC, 0666)) == NULL)
610 error (1, errno, "cannot open dbm file %s for creation", temp);
680 error (0, errno, "cannot close %s", temp);
689 (void) sprintf (dotdir, "%s.dir", temp);
690 (void) sprintf (dotpag, "%s.pag", temp);
691 (void) sprintf (dotdb, "%s.db", temp);
706 rename_dbmfile (temp) in rename_dbmfile() argument
707 char *temp; in rename_dbmfile()
727 (void) sprintf (newdir, "%s.dir", temp);
728 (void) sprintf (newpag, "%s.pag", temp);
729 (void) sprintf (newdb, "%s.db", temp);
756 /* mv "temp".dir modules.dir */
759 /* mv "temp".pag modules.pag */
762 /* mv "temp".db modules.db */
796 rename_rcsfile (temp, real) in rename_rcsfile() argument
797 char *temp; in rename_rcsfile()
813 if (chmod (temp, 0444 | (statbuf.st_mode & 0111)) < 0)
814 error (0, errno, "warning: cannot chmod %s", temp);
828 /* mv "temp" loginfo */
829 if (CVS_RENAME (temp, real) < 0
831 error (0, errno, "cannot rename %s to %s", temp, real);