Lines Matching refs:temp

24 static int checkout_file (char *file, char *temp);
26 static void rename_rcsfile (char *temp, char *real);
29 static void rename_dbmfile (char *temp);
30 static void write_dbmfile (char *temp);
780 char *temp; in mkmodules() local
802 temp = make_tempfile (); in mkmodules()
803 switch (checkout_file (CVSROOTADM_MODULES, temp)) in mkmodules()
809 if ((db = dbm_open (temp, O_RDONLY, 0666)) != NULL) in mkmodules()
812 write_dbmfile (temp); in mkmodules()
813 rename_dbmfile (temp); in mkmodules()
815 rename_rcsfile (temp, CVSROOTADM_MODULES); in mkmodules()
825 if (unlink_file (temp) < 0 in mkmodules()
827 error (0, errno, "cannot remove %s", temp); in mkmodules()
828 free (temp); in mkmodules()
834 temp = make_tempfile (); in mkmodules()
835 if (checkout_file (fileptr->filename, temp) == 0) in mkmodules()
836 rename_rcsfile (temp, fileptr->filename); in mkmodules()
845 if (unlink_file (temp) < 0 in mkmodules()
847 error (0, errno, "cannot remove %s", temp); in mkmodules()
848 free (temp); in mkmodules()
880 temp = make_tempfile (); in mkmodules()
881 if (checkout_file (fname, temp) == 0) in mkmodules()
883 rename_rcsfile (temp, fname); in mkmodules()
895 if (unlink_file (temp) < 0 in mkmodules()
897 error (0, errno, "cannot remove %s", temp); in mkmodules()
898 free (temp); in mkmodules()
932 char *temp; in make_tempfile() local
936 temp = xmalloc (sizeof (BAKPREFIX) + 40); in make_tempfile()
939 (void) sprintf (temp, "%s%d", BAKPREFIX, seed++); in make_tempfile()
940 if ((fd = CVS_OPEN (temp, O_CREAT|O_EXCL|O_RDWR, 0666)) != -1) in make_tempfile()
943 error (1, errno, "cannot create temporary file %s", temp); in make_tempfile()
946 error(1, errno, "cannot close temporary file %s", temp); in make_tempfile()
947 return temp; in make_tempfile()
956 checkout_file (char *file, char *temp) in checkout_file() argument
982 retcode = RCS_checkout (rcsnode, NULL, NULL, NULL, NULL, temp, NULL, NULL); in checkout_file()
1000 write_dbmfile( char *temp ) in write_dbmfile() argument
1009 fp = xfopen (temp, "r"); in write_dbmfile()
1010 if ((db = dbm_open (temp, O_RDWR | O_CREAT | O_TRUNC, 0666)) == NULL) in write_dbmfile()
1011 error (1, errno, "cannot open dbm file %s for creation", temp); in write_dbmfile()
1081 error (0, errno, "cannot close %s", temp); in write_dbmfile()
1090 (void) sprintf (dotdir, "%s.dir", temp); in write_dbmfile()
1091 (void) sprintf (dotpag, "%s.pag", temp); in write_dbmfile()
1092 (void) sprintf (dotdb, "%s.db", temp); in write_dbmfile()
1107 rename_dbmfile( char *temp ) in rename_dbmfile() argument
1127 (void) sprintf (newdir, "%s.dir", temp); in rename_dbmfile()
1128 (void) sprintf (newpag, "%s.pag", temp); in rename_dbmfile()
1129 (void) sprintf (newdb, "%s.db", temp); in rename_dbmfile()
1196 rename_rcsfile (char *temp, char *real) in rename_rcsfile() argument
1210 if (chmod (temp, 0444 | (statbuf.st_mode & 0111)) < 0) in rename_rcsfile()
1211 error (0, errno, "warning: cannot chmod %s", temp); in rename_rcsfile()
1225 if (CVS_RENAME (temp, real) < 0 in rename_rcsfile()
1227 error (0, errno, "cannot rename %s to %s", temp, real); in rename_rcsfile()