Lines Matching refs:tempfile
127 …rator_copy_file_prefix_(FLAC__Metadata_SimpleIterator *iterator, FILE **tempfile, char **tempfilen…
128 …ator_copy_file_postfix_(FLAC__Metadata_SimpleIterator *iterator, FILE **tempfile, char **tempfilen…
130 static FLAC__bool copy_n_bytes_from_file_(FILE *file, FILE *tempfile, off_t bytes, FLAC__Metadata_S…
132 static FLAC__bool copy_remaining_bytes_from_file_(FILE *file, FILE *tempfile, FLAC__Metadata_Simple…
135 …empfile_(const char *filename, const char *tempfile_path_prefix, FILE **tempfile, char **tempfilen…
136 static FLAC__bool transport_tempfile_(const char *filename, FILE **tempfile, char **tempfilename, F…
137 static void cleanup_tempfile_(FILE **tempfile, char **tempfilename);
1399 FILE *f, *tempfile; in chain_rewrite_file_() local
1413 if(!open_tempfile_(chain->filename, tempfile_path_prefix, &tempfile, &tempfilename, &status)) { in chain_rewrite_file_()
1415 cleanup_tempfile_(&tempfile, &tempfilename); in chain_rewrite_file_()
1418 if(!copy_n_bytes_from_file_(f, tempfile, chain->first_offset, &status)) { in chain_rewrite_file_()
1420 cleanup_tempfile_(&tempfile, &tempfilename); in chain_rewrite_file_()
1426 if(!write_metadata_block_header_(tempfile, &status, node->data)) { in chain_rewrite_file_()
1430 if(!write_metadata_block_data_(tempfile, &status, node->data)) { in chain_rewrite_file_()
1439 cleanup_tempfile_(&tempfile, &tempfilename); in chain_rewrite_file_()
1443 if(!copy_remaining_bytes_from_file_(f, tempfile, &status)) { in chain_rewrite_file_()
1444 cleanup_tempfile_(&tempfile, &tempfilename); in chain_rewrite_file_()
1451 if(!transport_tempfile_(chain->filename, &tempfile, &tempfilename, &status)) in chain_rewrite_file_()
2904 FILE *tempfile; in rewrite_whole_file_() local
2929 if(!simple_iterator_copy_file_prefix_(iterator, &tempfile, &tempfilename, append)) in rewrite_whole_file_()
2933 if(!write_metadata_block_header_(tempfile, &iterator->status, block)) { in rewrite_whole_file_()
2934 cleanup_tempfile_(&tempfile, &tempfilename); in rewrite_whole_file_()
2938 if(!write_metadata_block_data_(tempfile, &iterator->status, block)) { in rewrite_whole_file_()
2939 cleanup_tempfile_(&tempfile, &tempfilename); in rewrite_whole_file_()
2944 …if(!simple_iterator_copy_file_postfix_(iterator, &tempfile, &tempfilename, fixup_is_last_code, fix… in rewrite_whole_file_()
3033 …rator_copy_file_prefix_(FLAC__Metadata_SimpleIterator *iterator, FILE **tempfile, char **tempfilen… in simple_iterator_copy_file_prefix_() argument
3041 …if(!open_tempfile_(iterator->filename, iterator->tempfile_path_prefix, tempfile, tempfilename, &it… in simple_iterator_copy_file_prefix_()
3042 cleanup_tempfile_(tempfile, tempfilename); in simple_iterator_copy_file_prefix_()
3045 if(!copy_n_bytes_from_file_(iterator->file, *tempfile, offset_end, &iterator->status)) { in simple_iterator_copy_file_prefix_()
3046 cleanup_tempfile_(tempfile, tempfilename); in simple_iterator_copy_file_prefix_()
3053 …ator_copy_file_postfix_(FLAC__Metadata_SimpleIterator *iterator, FILE **tempfile, char **tempfilen… in simple_iterator_copy_file_postfix_() argument
3056 FLAC__ASSERT(0 != *tempfile); in simple_iterator_copy_file_postfix_()
3059 cleanup_tempfile_(tempfile, tempfilename); in simple_iterator_copy_file_postfix_()
3063 if(!copy_remaining_bytes_from_file_(iterator->file, *tempfile, &iterator->status)) { in simple_iterator_copy_file_postfix_()
3064 cleanup_tempfile_(tempfile, tempfilename); in simple_iterator_copy_file_postfix_()
3077 if(0 != fseeko(*tempfile, fixup_is_last_flag_offset, SEEK_SET)) { in simple_iterator_copy_file_postfix_()
3078 cleanup_tempfile_(tempfile, tempfilename); in simple_iterator_copy_file_postfix_()
3082 if(fread(&x, 1, 1, *tempfile) != 1) { in simple_iterator_copy_file_postfix_()
3083 cleanup_tempfile_(tempfile, tempfilename); in simple_iterator_copy_file_postfix_()
3095 if(0 != fseeko(*tempfile, fixup_is_last_flag_offset, SEEK_SET)) { in simple_iterator_copy_file_postfix_()
3096 cleanup_tempfile_(tempfile, tempfilename); in simple_iterator_copy_file_postfix_()
3100 if(local__fwrite(&x, 1, 1, *tempfile) != 1) { in simple_iterator_copy_file_postfix_()
3101 cleanup_tempfile_(tempfile, tempfilename); in simple_iterator_copy_file_postfix_()
3109 if(!transport_tempfile_(iterator->filename, tempfile, tempfilename, &iterator->status)) in simple_iterator_copy_file_postfix_()
3132 FLAC__bool copy_n_bytes_from_file_(FILE *file, FILE *tempfile, off_t bytes, FLAC__Metadata_SimpleIt… in copy_n_bytes_from_file_() argument
3144 if(local__fwrite(buffer, 1, n, tempfile) != n) { in copy_n_bytes_from_file_()
3176 FLAC__bool copy_remaining_bytes_from_file_(FILE *file, FILE *tempfile, FLAC__Metadata_SimpleIterato… in copy_remaining_bytes_from_file_() argument
3187 if(n > 0 && local__fwrite(buffer, 1, n, tempfile) != n) { in copy_remaining_bytes_from_file_()
3216 FLAC__bool open_tempfile_(const char *filename, const char *tempfile_path_prefix, FILE **tempfile, … in open_tempfile_() argument
3244 if(0 == (*tempfile = fopen(*tempfilename, "w+b"))) { in open_tempfile_()
3252 FLAC__bool transport_tempfile_(const char *filename, FILE **tempfile, char **tempfilename, FLAC__Me… in transport_tempfile_() argument
3255 FLAC__ASSERT(0 != tempfile); in transport_tempfile_()
3256 FLAC__ASSERT(0 != *tempfile); in transport_tempfile_()
3261 (void)fclose(*tempfile); in transport_tempfile_()
3262 *tempfile = 0; in transport_tempfile_()
3267 cleanup_tempfile_(tempfile, tempfilename); in transport_tempfile_()
3275 cleanup_tempfile_(tempfile, tempfilename); in transport_tempfile_()
3280 cleanup_tempfile_(tempfile, tempfilename); in transport_tempfile_()
3285 void cleanup_tempfile_(FILE **tempfile, char **tempfilename) in cleanup_tempfile_() argument
3287 if(0 != *tempfile) { in cleanup_tempfile_()
3288 (void)fclose(*tempfile); in cleanup_tempfile_()
3289 *tempfile = 0; in cleanup_tempfile_()