Lines Matching refs:tempfilename
202 bool open_tempfile_(const char *filename, FILE **tempfile, char **tempfilename) in open_tempfile_() argument
207 *tempfilename = (char*)malloc(destlen); in open_tempfile_()
208 if (*tempfilename == 0) in open_tempfile_()
210 flac_snprintf(*tempfilename, destlen, "%s%s", filename, tempfile_suffix); in open_tempfile_()
212 *tempfile = flac_fopen(*tempfilename, "wb"); in open_tempfile_()
219 void cleanup_tempfile_(FILE **tempfile, char **tempfilename) in cleanup_tempfile_() argument
226 if (*tempfilename != 0) { in cleanup_tempfile_()
227 (void)flac_unlink(*tempfilename); in cleanup_tempfile_()
228 free(*tempfilename); in cleanup_tempfile_()
229 *tempfilename = 0; in cleanup_tempfile_()
233 bool transport_tempfile_(const char *filename, FILE **tempfile, char **tempfilename) in transport_tempfile_() argument
237 FLAC__ASSERT(0 != tempfilename); in transport_tempfile_()
238 FLAC__ASSERT(0 != *tempfilename); in transport_tempfile_()
248 cleanup_tempfile_(tempfile, tempfilename); in transport_tempfile_()
253 if(0 != flac_rename(*tempfilename, filename)) { in transport_tempfile_()
254 cleanup_tempfile_(tempfile, tempfilename); in transport_tempfile_()
258 cleanup_tempfile_(tempfile, tempfilename); in transport_tempfile_()
340 char *tempfilename; in write_chain_() local
347 if(!open_tempfile_(filename, &tempfile, &tempfilename)) { in write_chain_()
349 cleanup_tempfile_(&tempfile, &tempfilename); in write_chain_()
360 if(!transport_tempfile_(filename, &tempfile, &tempfilename)) in write_chain_()