| 1 | /* libFLAC - Free Lossless Audio Codec library |
| 2 | * Copyright (C) 2001-2009 Josh Coalson |
| 3 | * Copyright (C) 2011-2025 Xiph.Org Foundation |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: |
| 8 | * |
| 9 | * - Redistributions of source code must retain the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer. |
| 11 | * |
| 12 | * - Redistributions in binary form must reproduce the above copyright |
| 13 | * notice, this list of conditions and the following disclaimer in the |
| 14 | * documentation and/or other materials provided with the distribution. |
| 15 | * |
| 16 | * - Neither the name of the Xiph.org Foundation nor the names of its |
| 17 | * contributors may be used to endorse or promote products derived from |
| 18 | * this software without specific prior written permission. |
| 19 | * |
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR |
| 24 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 | */ |
| 32 | |
| 33 | //ppgb #ifdef HAVE_CONFIG_H |
| 34 | #include "flac_config.h"cxx . . $ `<file>/external/flac/flac_config.h`/ |
| 35 | //ppgb #endif |
| 36 | |
| 37 | #include <errno.h> |
| 38 | #include <stdio.h> |
| 39 | #include <stdlib.h> |
| 40 | #include <string.h> |
| 41 | #include <stdarg.h> |
| 42 | |
| 43 | #include <sys/stat.h> /* for stat(), maybe chmod() */ |
| 44 | |
| 45 | #include "flac_private_metadata.h"cxx . . $ `<file>/external/flac/flac_private_metadata.h`/ |
| 46 | |
| 47 | #include "flac_FLAC_assert.h"cxx . . $ `<file>/external/flac/flac_FLAC_assert.h`/ |
| 48 | #include "flac_FLAC_stream_decoder.h"cxx . . $ `<file>/external/flac/flac_FLAC_stream_decoder.h`/ |
| 49 | #include "flac_share_alloc.h"cxx . . $ `<file>/external/flac/flac_share_alloc.h`/ |
| 50 | #include "flac_share_compat.h"cxx . . $ `<file>/external/flac/flac_share_compat.h`/ |
| 51 | #include "flac_share_macros.h"cxx . . $ `<file>/external/flac/flac_share_macros.h`/ |
| 52 | #include "flac_private_macros.h"cxx . . $ `<file>/external/flac/flac_private_macros.h`/ |
| 53 | #include "flac_private_memory.h"cxx . . $ `<file>/external/flac/flac_private_memory.h`/ |
| 54 | |
| 55 | /* Alias the first (in share/alloc.h) to the second (in src/libFLAC/memory.c). */ |
| 56 | #define safe_malloc_mul_2op_cxx . . $ `external/flac/flac_metadata_iterators.c:56:9`! safe_malloc_mul_2op_p |
| 57 | |
| 58 | /**************************************************************************** |
| 59 | * |
| 60 | * Local function declarations |
| 61 | * |
| 62 | ***************************************************************************/ |
| 63 | |
| 64 | static void pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(FLAC__uint32cxx . . $ FLAC__uint32# val, FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes); |
| 65 | static void pack_uint32_little_endian_cxx . . $ pack_uint32_little_endian_(948b2170e76063bc).(FLAC__uint32cxx . . $ FLAC__uint32# val, FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes); |
| 66 | static void pack_uint64_cxx . . $ pack_uint64_(1f08f972bc7cbafe).(FLAC__uint64cxx . . $ FLAC__uint64# val, FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes); |
| 67 | static FLAC__uint32cxx . . $ FLAC__uint32# unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes); |
| 68 | static FLAC__uint32cxx . . $ FLAC__uint32# unpack_uint32_little_endian_cxx . . $ unpack_uint32_little_endian_(1d7cbbd5718e4a4f).(FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes); |
| 69 | static FLAC__uint64cxx . . $ FLAC__uint64# unpack_uint64_cxx . . $ unpack_uint64_(f323263d662f9058).(FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes); |
| 70 | |
| 71 | static FLAC__boolcxx . . $ FLAC__bool# read_metadata_block_header_cxx . . $ read_metadata_block_header_(2e72b239d5ede54f).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator); |
| 72 | static FLAC__boolcxx . . $ FLAC__bool# read_metadata_block_data_cxx . . $ read_metadata_block_data_(24e551a2ffc6da2b).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block); |
| 73 | static FLAC__boolcxx . . $ FLAC__bool# read_metadata_block_header_cb_cxx . . $ read_metadata_block_header_cb_(5c638d57e53399a4).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__boolcxx . . $ FLAC__bool# *is_last, FLAC__MetadataTypecxx . . $ FLAC__MetadataType# *type, uint32_tcxx . . $ uint32_t# *length); |
| 74 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_cb_cxx . . $ read_metadata_block_data_cb_(4233a43fc2cc3a52).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block); |
| 75 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_streaminfo_cb_cxx . . $ read_metadata_block_data_streaminfo_cb_(584ad77fb9585242).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_StreamInfocxx . . $ FLAC__StreamMetadata_StreamInfo# *block); |
| 76 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_padding_cb_cxx . . $ read_metadata_block_data_padding_cb_(1a02766a644191df).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb, FLAC__StreamMetadata_Paddingcxx . . $ FLAC__StreamMetadata_Padding# *block, uint32_tcxx . . $ uint32_t# block_length); |
| 77 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_application_cb_cxx . . $ read_metadata_block_data_application_cb_(25c32ebb5585407c).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_Applicationcxx . . $ FLAC__StreamMetadata_Application# *block, uint32_tcxx . . $ uint32_t# block_length); |
| 78 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_seektable_cb_cxx . . $ read_metadata_block_data_seektable_cb_(5b7e9a8f69191e54).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_SeekTablecxx . . $ FLAC__StreamMetadata_SeekTable# *block, uint32_tcxx . . $ uint32_t# block_length); |
| 79 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_vorbis_comment_entry_cb_cxx . . $ read_metadata_block_data_vorbis_comment_entry_cb_(53bf8e2328cbf52a).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_VorbisComment_Entrycxx . . $ FLAC__StreamMetadata_VorbisComment_Entry# *entry, uint32_tcxx . . $ uint32_t# max_length); |
| 80 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_vorbis_comment_cb_cxx . . $ read_metadata_block_data_vorbis_comment_cb_(ba52f2232469b28c).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb, FLAC__StreamMetadata_VorbisCommentcxx . . $ FLAC__StreamMetadata_VorbisComment# *block, uint32_tcxx . . $ uint32_t# block_length); |
| 81 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_cuesheet_track_cb_cxx . . $ read_metadata_block_data_cuesheet_track_cb_(b218e9e6b35cb4a4).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_CueSheet_Trackcxx . . $ FLAC__StreamMetadata_CueSheet_Track# *track); |
| 82 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_cuesheet_cb_cxx . . $ read_metadata_block_data_cuesheet_cb_(fe39bb7bcc8e812a).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_CueSheetcxx . . $ FLAC__StreamMetadata_CueSheet# *block); |
| 83 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_picture_cb_cxx . . $ read_metadata_block_data_picture_cb_(e5d5f6ea060a84ed).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_Picturecxx . . $ FLAC__StreamMetadata_Picture# *block); |
| 84 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_unknown_cb_cxx . . $ read_metadata_block_data_unknown_cb_(96443185be7acd7b).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_Unknowncxx . . $ FLAC__StreamMetadata_Unknown# *block, uint32_tcxx . . $ uint32_t# block_length); |
| 85 | |
| 86 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_header_cxx . . $ write_metadata_block_header_(c3cf93eace4ac78).(FILEcxx . . $ FILE# *file, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block); |
| 87 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_cxx . . $ write_metadata_block_data_(c3cf93eace4ac78).(FILEcxx . . $ FILE# *file, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block); |
| 88 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_header_cb_cxx . . $ write_metadata_block_header_cb_(71df1ec83e67c887).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block); |
| 89 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_cb_cxx . . $ write_metadata_block_data_cb_(71df1ec83e67c887).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block); |
| 90 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_streaminfo_cb_cxx . . $ write_metadata_block_data_streaminfo_cb_(a91c5a2b86ba1b06).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_StreamInfocxx . . $ FLAC__StreamMetadata_StreamInfo# *block); |
| 91 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_padding_cb_cxx . . $ write_metadata_block_data_padding_cb_(f9b2cbcdc511b496).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_Paddingcxx . . $ FLAC__StreamMetadata_Padding# *block, uint32_tcxx . . $ uint32_t# block_length); |
| 92 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_application_cb_cxx . . $ write_metadata_block_data_application_cb_(b9819cc5c4ff8465).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_Applicationcxx . . $ FLAC__StreamMetadata_Application# *block, uint32_tcxx . . $ uint32_t# block_length); |
| 93 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_seektable_cb_cxx . . $ write_metadata_block_data_seektable_cb_(bbf293164247f37a).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_SeekTablecxx . . $ FLAC__StreamMetadata_SeekTable# *block); |
| 94 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_vorbis_comment_cb_cxx . . $ write_metadata_block_data_vorbis_comment_cb_(45d9dbf5b91cf6dd).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_VorbisCommentcxx . . $ FLAC__StreamMetadata_VorbisComment# *block); |
| 95 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_cuesheet_cb_cxx . . $ write_metadata_block_data_cuesheet_cb_(702ae541a3a1d78c).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_CueSheetcxx . . $ FLAC__StreamMetadata_CueSheet# *block); |
| 96 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_picture_cb_cxx . . $ write_metadata_block_data_picture_cb_(e33dc757b6145ce8).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_Picturecxx . . $ FLAC__StreamMetadata_Picture# *block); |
| 97 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_unknown_cb_cxx . . $ write_metadata_block_data_unknown_cb_(587119d020e838fc).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_Unknowncxx . . $ FLAC__StreamMetadata_Unknown# *block, uint32_tcxx . . $ uint32_t# block_length); |
| 98 | |
| 99 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_stationary_cxx . . $ write_metadata_block_stationary_(606680ad4cb8c5d4).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block); |
| 100 | static FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_stationary_with_padding_cxx . . $ write_metadata_block_stationary_with_padding_(5ee4a6e34e3587d4).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block, uint32_tcxx . . $ uint32_t# padding_length, FLAC__boolcxx . . $ FLAC__bool# padding_is_last); |
| 101 | static FLAC__boolcxx . . $ FLAC__bool# rewrite_whole_file_cxx . . $ rewrite_whole_file_(e6b59472951b3ba4).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block, FLAC__boolcxx . . $ FLAC__bool# append); |
| 102 | |
| 103 | static void simple_iterator_push_cxx . . $ simple_iterator_push_(ce497eb305ff27be).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator); |
| 104 | static FLAC__boolcxx . . $ FLAC__bool# simple_iterator_pop_cxx . . $ simple_iterator_pop_(2e72b239d5ede54f).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator); |
| 105 | |
| 106 | static uint32_tcxx . . $ uint32_t# seek_to_first_metadata_block_cb_cxx . . $ seek_to_first_metadata_block_cb_(7e14ee485b111c9a).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb); |
| 107 | static uint32_tcxx . . $ uint32_t# seek_to_first_metadata_block_cxx . . $ seek_to_first_metadata_block_(9eef1996c458a0e7).(FILEcxx . . $ FILE# *f); |
| 108 | |
| 109 | static FLAC__boolcxx . . $ FLAC__bool# simple_iterator_copy_file_prefix_cxx . . $ simple_iterator_copy_file_prefix_(37c4edd3754a66ee).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FILEcxx . . $ FILE# **tempfile, char **tempfilename, FLAC__boolcxx . . $ FLAC__bool# append); |
| 110 | static FLAC__boolcxx . . $ FLAC__bool# simple_iterator_copy_file_postfix_cxx . . $ simple_iterator_copy_file_postfix_(242f7b08c1fbb351).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FILEcxx . . $ FILE# **tempfile, char **tempfilename, int fixup_is_last_code, FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! fixup_is_last_flag_offset, FLAC__boolcxx . . $ FLAC__bool# backup); |
| 111 | |
| 112 | static FLAC__boolcxx . . $ FLAC__bool# copy_n_bytes_from_file_cxx . . $ copy_n_bytes_from_file_(4aae65a1eaf6530d).(FILEcxx . . $ FILE# *file, FILEcxx . . $ FILE# *tempfile, FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! bytes, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status); |
| 113 | static FLAC__boolcxx . . $ FLAC__bool# copy_n_bytes_from_file_cb_cxx . . $ copy_n_bytes_from_file_cb_(21a1345fa71c3da1).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOHandlecxx . . $ FLAC__IOHandle# temp_handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# temp_write_cb, FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! bytes, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status); |
| 114 | static FLAC__boolcxx . . $ FLAC__bool# copy_remaining_bytes_from_file_cxx . . $ copy_remaining_bytes_from_file_(2d4c80edcad7c5cd).(FILEcxx . . $ FILE# *file, FILEcxx . . $ FILE# *tempfile, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status); |
| 115 | static FLAC__boolcxx . . $ FLAC__bool# copy_remaining_bytes_from_file_cb_cxx . . $ copy_remaining_bytes_from_file_cb_(98d7a5e9975a6a84).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOCallback_Eofcxx . . $ FLAC__IOCallback_Eof# eof_cb, FLAC__IOHandlecxx . . $ FLAC__IOHandle# temp_handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# temp_write_cb, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status); |
| 116 | |
| 117 | static FLAC__boolcxx . . $ FLAC__bool# open_tempfile_cxx . . $ open_tempfile_(542af00b782cb0a6).(const char *filename, const char *tempfile_path_prefix, FILEcxx . . $ FILE# **tempfile, char **tempfilename, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status); |
| 118 | static FLAC__boolcxx . . $ FLAC__bool# transport_tempfile_cxx . . $ transport_tempfile_(73e0dab43aae5506).(const char *filename, FILEcxx . . $ FILE# **tempfile, char **tempfilename, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status); |
| 119 | static void cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(FILEcxx . . $ FILE# **tempfile, char **tempfilename); |
| 120 | |
| 121 | static FLAC__boolcxx . . $ FLAC__bool# get_file_stats_cxx . . $ get_file_stats_(a9cd1e23e96f423c).(const char *filename, struct flac_stat_scxx . . $ `external/flac/flac_share_compat.h:217:9`! *stats); |
| 122 | static void set_file_stats_cxx . . $ set_file_stats_(a6d86f3aaa0bc44b).(const char *filename, struct flac_stat_scxx . . $ `external/flac/flac_share_compat.h:217:9`! *stats); |
| 123 | |
| 124 | static int fseek_wrapper_cxx . . $ fseek_wrapper_(8bc0ff128761c75d).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__int64cxx . . $ FLAC__int64# offset, int whence); |
| 125 | static FLAC__int64cxx . . $ FLAC__int64# ftell_wrapper_cxx . . $ ftell_wrapper_(72c1818a5177f981).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle); |
| 126 | |
| 127 | static FLAC__Metadata_ChainStatuscxx . . $ FLAC__Metadata_ChainStatus# get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# status); |
| 128 | |
| 129 | |
| 130 | #ifdef FLAC__VALGRIND_TESTING |
| 131 | static size_t local__fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) |
| 132 | { |
| 133 | size_t ret = fwrite(ptr, size, nmemb, stream); |
| 134 | if(!ferror(stream)) |
| 135 | fflush(stream); |
| 136 | return ret; |
| 137 | } |
| 138 | #else |
| 139 | #define local__fwritecxx . . $ `external/flac/flac_metadata_iterators.c:139:9`! fwrite |
| 140 | #endif |
| 141 | |
| 142 | /**************************************************************************** |
| 143 | * |
| 144 | * Level 0 implementation |
| 145 | * |
| 146 | ***************************************************************************/ |
| 147 | |
| 148 | static FLAC__StreamDecoderWriteStatuscxx . . $ FLAC__StreamDecoderWriteStatus# write_callback_cxx . . $ write_callback_(8375096e9a6e9bab).(const FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder, const FLAC__Framecxx . . $ FLAC__Frame# *frame, const FLAC__int32cxx . . $ FLAC__int32# * const buffer[], void *client_data); |
| 149 | static void metadata_callback_cxx . . $ metadata_callback_(6339de7fa1cf73d0).(const FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *metadata, void *client_data); |
| 150 | static void error_callback_cxx . . $ error_callback_(56d9ba04c86f7e6d).(const FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder, FLAC__StreamDecoderErrorStatuscxx . . $ FLAC__StreamDecoderErrorStatus# status, void *client_data); |
| 151 | |
| 152 | typedef structcxx . . $ $anonymous_type_91d78abc3b3f5c98_0# { |
| 153 | FLAC__boolcxx . . $ FLAC__bool# got_errorcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#got_error.; |
| 154 | FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *objectcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#object.; |
| 155 | } level0_client_datacxx . . $ level0_client_data#; |
| 156 | |
| 157 | static FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *get_one_metadata_block_cxx . . $ get_one_metadata_block_(62a8633dbfd46556).(const char *filename, FLAC__MetadataTypecxx . . $ FLAC__MetadataType# type) |
| 158 | { |
| 159 | level0_client_datacxx . . $ level0_client_data# cd; |
| 160 | FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder; |
| 161 | FILEcxx . . $ FILE# *file; |
| 162 | FLAC__boolcxx . . $ FLAC__bool# open_as_ogg = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 163 | |
| 164 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != filename); |
| 165 | |
| 166 | cd.got_errorcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#got_error. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 167 | cd.objectcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#object. = 0; |
| 168 | |
| 169 | decoder = FLAC__stream_decoder_newcxx . . $ FLAC__stream_decoder_new(7336f55c5f66a48b).(); |
| 170 | |
| 171 | if(0 == decoder) |
| 172 | return 0; |
| 173 | |
| 174 | FLAC__stream_decoder_set_md5_checkingcxx . . $ FLAC__stream_decoder_set_md5_checking(179b1a96f8cf0980).(decoder, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 175 | FLAC__stream_decoder_set_metadata_ignore_allcxx . . $ FLAC__stream_decoder_set_metadata_ignore_all(d92048749c4f1284).(decoder); |
| 176 | FLAC__stream_decoder_set_metadata_respondcxx . . $ FLAC__stream_decoder_set_metadata_respond(b396ab4035fefde5).(decoder, type); |
| 177 | |
| 178 | /* Try to open the file and determine whether it is Ogg */ |
| 179 | if(0 != (file = flac_fopencxx . . $ `external/flac/flac_share_compat.h:200:9`!(filename, "rb"))) { |
| 180 | FLAC__bytecxx . . $ FLAC__byte# signature[4]; |
| 181 | if(freadcxx . . $ fread(738fc8ac1d711e58).(&signature, 1, 4, file) == 4) { |
| 182 | if(memcmpcxx . . $ memcmp(36f949851efa3055).(&signature,"OggS",4) == 0) |
| 183 | open_as_ogg = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 184 | } |
| 185 | fclosecxx . . $ fclose(89bc1efcdac0ca22).(file); |
| 186 | } |
| 187 | |
| 188 | if(!open_as_ogg) { |
| 189 | if(FLAC__stream_decoder_init_filecxx . . $ FLAC__stream_decoder_init_file(8533d49b78a1e68d).(decoder, filename, write_callback_cxx . . $ write_callback_(8375096e9a6e9bab)., metadata_callback_cxx . . $ metadata_callback_(6339de7fa1cf73d0)., error_callback_cxx . . $ error_callback_(56d9ba04c86f7e6d)., &cd) != FLAC__STREAM_DECODER_INIT_STATUS_OKcxx . . $ FLAC__STREAM_DECODER_INIT_STATUS_OK. || cd.got_errorcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#got_error.) { |
| 190 | (void)FLAC__stream_decoder_finishcxx . . $ FLAC__stream_decoder_finish(d92048749c4f1284).(decoder); |
| 191 | FLAC__stream_decoder_deletecxx . . $ FLAC__stream_decoder_delete(1ffd9838c68f2516).(decoder); |
| 192 | return 0; |
| 193 | } |
| 194 | } |
| 195 | else { |
| 196 | if(FLAC__stream_decoder_init_ogg_filecxx . . $ FLAC__stream_decoder_init_ogg_file(8533d49b78a1e68d).(decoder, filename, write_callback_cxx . . $ write_callback_(8375096e9a6e9bab)., metadata_callback_cxx . . $ metadata_callback_(6339de7fa1cf73d0)., error_callback_cxx . . $ error_callback_(56d9ba04c86f7e6d)., &cd) != FLAC__STREAM_DECODER_INIT_STATUS_OKcxx . . $ FLAC__STREAM_DECODER_INIT_STATUS_OK. || cd.got_errorcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#got_error.) { |
| 197 | (void)FLAC__stream_decoder_finishcxx . . $ FLAC__stream_decoder_finish(d92048749c4f1284).(decoder); |
| 198 | FLAC__stream_decoder_deletecxx . . $ FLAC__stream_decoder_delete(1ffd9838c68f2516).(decoder); |
| 199 | return 0; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | if(!FLAC__stream_decoder_process_until_end_of_metadatacxx . . $ FLAC__stream_decoder_process_until_end_of_metadata(d92048749c4f1284).(decoder) || cd.got_errorcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#got_error.) { |
| 204 | (void)FLAC__stream_decoder_finishcxx . . $ FLAC__stream_decoder_finish(d92048749c4f1284).(decoder); |
| 205 | FLAC__stream_decoder_deletecxx . . $ FLAC__stream_decoder_delete(1ffd9838c68f2516).(decoder); |
| 206 | if(0 != cd.objectcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#object.) |
| 207 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(cd.objectcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#object.); |
| 208 | return 0; |
| 209 | } |
| 210 | |
| 211 | (void)FLAC__stream_decoder_finishcxx . . $ FLAC__stream_decoder_finish(d92048749c4f1284).(decoder); |
| 212 | FLAC__stream_decoder_deletecxx . . $ FLAC__stream_decoder_delete(1ffd9838c68f2516).(decoder); |
| 213 | |
| 214 | return cd.objectcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#object.; |
| 215 | } |
| 216 | |
| 217 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_get_streaminfocxx . . $ FLAC__metadata_get_streaminfo(e4852c4b80956f05).(const char *filename, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *streaminfo) |
| 218 | { |
| 219 | FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *object; |
| 220 | |
| 221 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != filename); |
| 222 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != streaminfo); |
| 223 | |
| 224 | object = get_one_metadata_block_cxx . . $ get_one_metadata_block_(62a8633dbfd46556).(filename, FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.); |
| 225 | |
| 226 | if (object) { |
| 227 | /* can just copy the contents since STREAMINFO has no internal structure */ |
| 228 | *streaminfo = *object; |
| 229 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(object); |
| 230 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 231 | } |
| 232 | else { |
| 233 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_get_tagscxx . . $ FLAC__metadata_get_tags(405b74badd3c7390).(const char *filename, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# **tags) |
| 238 | { |
| 239 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != filename); |
| 240 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != tags); |
| 241 | |
| 242 | *tags = get_one_metadata_block_cxx . . $ get_one_metadata_block_(62a8633dbfd46556).(filename, FLAC__METADATA_TYPE_VORBIS_COMMENTcxx . . $ FLAC__METADATA_TYPE_VORBIS_COMMENT.); |
| 243 | |
| 244 | return 0 != *tags; |
| 245 | } |
| 246 | |
| 247 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_get_cuesheetcxx . . $ FLAC__metadata_get_cuesheet(405b74badd3c7390).(const char *filename, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# **cuesheet) |
| 248 | { |
| 249 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != filename); |
| 250 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != cuesheet); |
| 251 | |
| 252 | *cuesheet = get_one_metadata_block_cxx . . $ get_one_metadata_block_(62a8633dbfd46556).(filename, FLAC__METADATA_TYPE_CUESHEETcxx . . $ FLAC__METADATA_TYPE_CUESHEET.); |
| 253 | |
| 254 | return 0 != *cuesheet; |
| 255 | } |
| 256 | |
| 257 | FLAC__StreamDecoderWriteStatuscxx . . $ FLAC__StreamDecoderWriteStatus# write_callback_cxx . . $ write_callback_(8375096e9a6e9bab).(const FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder, const FLAC__Framecxx . . $ FLAC__Frame# *frame, const FLAC__int32cxx . . $ FLAC__int32# * const buffer[], void *client_data) |
| 258 | { |
| 259 | (void)decoder, (void)frame, (void)buffer, (void)client_data; |
| 260 | |
| 261 | return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUEcxx . . $ FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE.; |
| 262 | } |
| 263 | |
| 264 | void metadata_callback_cxx . . $ metadata_callback_(6339de7fa1cf73d0).(const FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *metadata, void *client_data) |
| 265 | { |
| 266 | level0_client_datacxx . . $ level0_client_data# *cd = (level0_client_datacxx . . $ level0_client_data# *)client_data; |
| 267 | (void)decoder; |
| 268 | |
| 269 | /* |
| 270 | * we assume we only get here when the one metadata block we were |
| 271 | * looking for was passed to us |
| 272 | */ |
| 273 | if(!cd->got_errorcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#got_error. && 0 == cd->objectcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#object.) { |
| 274 | if(0 == (cd->objectcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#object. = FLAC__metadata_object_clonecxx . . $ FLAC__metadata_object_clone(3ba84a9741e92d18).(metadata))) |
| 275 | cd->got_errorcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#got_error. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | void error_callback_cxx . . $ error_callback_(56d9ba04c86f7e6d).(const FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder, FLAC__StreamDecoderErrorStatuscxx . . $ FLAC__StreamDecoderErrorStatus# status, void *client_data) |
| 280 | { |
| 281 | level0_client_datacxx . . $ level0_client_data# *cd = (level0_client_datacxx . . $ level0_client_data# *)client_data; |
| 282 | (void)decoder; |
| 283 | |
| 284 | if(status != FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNCcxx . . $ FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC.) |
| 285 | cd->got_errorcxx . . $ $anonymous_type_91d78abc3b3f5c98_0#got_error. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 286 | } |
| 287 | |
| 288 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_get_picturecxx . . $ FLAC__metadata_get_picture(80b6b4e6fd537d18).(const char *filename, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# **picture, FLAC__StreamMetadata_Picture_Typecxx . . $ FLAC__StreamMetadata_Picture_Type# type, const char *mime_type, const FLAC__bytecxx . . $ FLAC__byte# *description, uint32_tcxx . . $ uint32_t# max_width, uint32_tcxx . . $ uint32_t# max_height, uint32_tcxx . . $ uint32_t# max_depth, uint32_tcxx . . $ uint32_t# max_colors) |
| 289 | { |
| 290 | FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *it; |
| 291 | FLAC__uint64cxx . . $ FLAC__uint64# max_area_seen = 0; |
| 292 | FLAC__uint64cxx . . $ FLAC__uint64# max_depth_seen = 0; |
| 293 | |
| 294 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != filename); |
| 295 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != picture); |
| 296 | |
| 297 | *picture = 0; |
| 298 | |
| 299 | it = FLAC__metadata_simple_iterator_newcxx . . $ FLAC__metadata_simple_iterator_new(718ed3453d6e07e9).(); |
| 300 | if(0 == it) |
| 301 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 302 | if(!FLAC__metadata_simple_iterator_initcxx . . $ FLAC__metadata_simple_iterator_init(a0981cbd538ed86a).(it, filename, /*read_only=*/truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!, /*preserve_file_stats=*/truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!)) { |
| 303 | FLAC__metadata_simple_iterator_deletecxx . . $ FLAC__metadata_simple_iterator_delete(ce497eb305ff27be).(it); |
| 304 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 305 | } |
| 306 | do { |
| 307 | if(FLAC__metadata_simple_iterator_get_block_typecxx . . $ FLAC__metadata_simple_iterator_get_block_type(1d69f41c657c9289).(it) == FLAC__METADATA_TYPE_PICTUREcxx . . $ FLAC__METADATA_TYPE_PICTURE.) { |
| 308 | FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *obj = FLAC__metadata_simple_iterator_get_blockcxx . . $ FLAC__metadata_simple_iterator_get_block(31b4e092374e9526).(it); |
| 309 | if(0 != obj) { |
| 310 | FLAC__uint64cxx . . $ FLAC__uint64# area = (FLAC__uint64cxx . . $ FLAC__uint64#)obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..widthcxx . . $ $anonymous_type_81a4853959168ec7_32#width. * (FLAC__uint64cxx . . $ FLAC__uint64#)obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..heightcxx . . $ $anonymous_type_81a4853959168ec7_32#height.; |
| 311 | |
| 312 | /* check constraints */ |
| 313 | if( |
| 314 | (type == (FLAC__StreamMetadata_Picture_Typecxx . . $ FLAC__StreamMetadata_Picture_Type#)(-1) || type == obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..typecxx . . $ $anonymous_type_81a4853959168ec7_32#type.) && |
| 315 | (mime_type == 0 || !strcmpcxx . . $ strcmp(5ae29d726ae57f88).(mime_type, obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..mime_typecxx . . $ $anonymous_type_81a4853959168ec7_32#mime_type.)) && |
| 316 | (description == 0 || !strcmpcxx . . $ strcmp(5ae29d726ae57f88).((const char *)description, (const char *)obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..descriptioncxx . . $ $anonymous_type_81a4853959168ec7_32#description.)) && |
| 317 | obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..widthcxx . . $ $anonymous_type_81a4853959168ec7_32#width. <= max_width && |
| 318 | obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..heightcxx . . $ $anonymous_type_81a4853959168ec7_32#height. <= max_height && |
| 319 | obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..depthcxx . . $ $anonymous_type_81a4853959168ec7_32#depth. <= max_depth && |
| 320 | obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..colorscxx . . $ $anonymous_type_81a4853959168ec7_32#colors. <= max_colors && |
| 321 | (area > max_area_seen || (area == max_area_seen && obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..depthcxx . . $ $anonymous_type_81a4853959168ec7_32#depth. > max_depth_seen)) |
| 322 | ) { |
| 323 | if(*picture) |
| 324 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(*picture); |
| 325 | *picture = obj; |
| 326 | max_area_seen = area; |
| 327 | max_depth_seen = obj->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..depthcxx . . $ $anonymous_type_81a4853959168ec7_32#depth.; |
| 328 | } |
| 329 | else { |
| 330 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(obj); |
| 331 | } |
| 332 | } |
| 333 | else |
| 334 | break; |
| 335 | } |
| 336 | } while(FLAC__metadata_simple_iterator_nextcxx . . $ FLAC__metadata_simple_iterator_next(2e72b239d5ede54f).(it)); |
| 337 | |
| 338 | FLAC__metadata_simple_iterator_deletecxx . . $ FLAC__metadata_simple_iterator_delete(ce497eb305ff27be).(it); |
| 339 | |
| 340 | return (0 != *picture); |
| 341 | } |
| 342 | |
| 343 | |
| 344 | /**************************************************************************** |
| 345 | * |
| 346 | * Level 1 implementation |
| 347 | * |
| 348 | ***************************************************************************/ |
| 349 | |
| 350 | #define SIMPLE_ITERATOR_MAX_PUSH_DEPTHcxx . . $ `external/flac/flac_metadata_iterators.c:350:9`! (1+4) |
| 351 | /* 1 for initial offset, +4 for our own personal use */ |
| 352 | |
| 353 | struct FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# { |
| 354 | FILEcxx . . $ FILE# *filecxx . . $ FLAC__Metadata_SimpleIterator#file.; |
| 355 | char *filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename., *tempfile_path_prefixcxx . . $ FLAC__Metadata_SimpleIterator#tempfile_path_prefix.; |
| 356 | struct flac_stat_scxx . . $ `external/flac/flac_share_compat.h:217:9`! statscxx . . $ FLAC__Metadata_SimpleIterator#stats.; |
| 357 | FLAC__boolcxx . . $ FLAC__bool# has_statscxx . . $ FLAC__Metadata_SimpleIterator#has_stats.; |
| 358 | FLAC__boolcxx . . $ FLAC__bool# is_writablecxx . . $ FLAC__Metadata_SimpleIterator#is_writable.; |
| 359 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# statuscxx . . $ FLAC__Metadata_SimpleIterator#status.; |
| 360 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[SIMPLE_ITERATOR_MAX_PUSH_DEPTHcxx . . $ `external/flac/flac_metadata_iterators.c:350:9`!]; |
| 361 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! first_offsetcxx . . $ FLAC__Metadata_SimpleIterator#first_offset.; /* this is the offset to the STREAMINFO block */ |
| 362 | uint32_tcxx . . $ uint32_t# depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.; |
| 363 | /* this is the metadata block header of the current block we are pointing to: */ |
| 364 | FLAC__boolcxx . . $ FLAC__bool# is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.; |
| 365 | FLAC__MetadataTypecxx . . $ FLAC__MetadataType# typecxx . . $ FLAC__Metadata_SimpleIterator#type.; |
| 366 | uint32_tcxx . . $ uint32_t# lengthcxx . . $ FLAC__Metadata_SimpleIterator#length.; |
| 367 | }; |
| 368 | |
| 369 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! const char * const FLAC__Metadata_SimpleIteratorStatusStringcxx . . $ FLAC__Metadata_SimpleIteratorStatusString.[] = { |
| 370 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK", |
| 371 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT", |
| 372 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE", |
| 373 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE", |
| 374 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE", |
| 375 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA", |
| 376 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR", |
| 377 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR", |
| 378 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR", |
| 379 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR", |
| 380 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR", |
| 381 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR", |
| 382 | "FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERROR" |
| 383 | }; |
| 384 | |
| 385 | |
| 386 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *FLAC__metadata_simple_iterator_newcxx . . $ FLAC__metadata_simple_iterator_new(718ed3453d6e07e9).(void) |
| 387 | { |
| 388 | FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator = calloccxx . . $ calloc(63a7bf2941bfcd7a).(1, sizeof(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator#)); |
| 389 | |
| 390 | if(0 != iterator) { |
| 391 | iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file. = 0; |
| 392 | iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename. = 0; |
| 393 | iterator->tempfile_path_prefixcxx . . $ FLAC__Metadata_SimpleIterator#tempfile_path_prefix. = 0; |
| 394 | iterator->has_statscxx . . $ FLAC__Metadata_SimpleIterator#has_stats. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 395 | iterator->is_writablecxx . . $ FLAC__Metadata_SimpleIterator#is_writable. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 396 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 397 | iterator->first_offsetcxx . . $ FLAC__Metadata_SimpleIterator#first_offset. = iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[0] = -1; |
| 398 | iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth. = 0; |
| 399 | } |
| 400 | |
| 401 | return iterator; |
| 402 | } |
| 403 | |
| 404 | static void simple_iterator_free_guts_cxx . . $ simple_iterator_free_guts_(ce497eb305ff27be).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 405 | { |
| 406 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 407 | |
| 408 | if(0 != iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file.) { |
| 409 | fclosecxx . . $ fclose(89bc1efcdac0ca22).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file.); |
| 410 | iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file. = 0; |
| 411 | if(iterator->has_statscxx . . $ FLAC__Metadata_SimpleIterator#has_stats.) |
| 412 | set_file_stats_cxx . . $ set_file_stats_(a6d86f3aaa0bc44b).(iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename., &iterator->statscxx . . $ FLAC__Metadata_SimpleIterator#stats.); |
| 413 | } |
| 414 | if(0 != iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename.) { |
| 415 | freecxx . . $ free(5d22bdacc48458e8).(iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename.); |
| 416 | iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename. = 0; |
| 417 | } |
| 418 | if(0 != iterator->tempfile_path_prefixcxx . . $ FLAC__Metadata_SimpleIterator#tempfile_path_prefix.) { |
| 419 | freecxx . . $ free(5d22bdacc48458e8).(iterator->tempfile_path_prefixcxx . . $ FLAC__Metadata_SimpleIterator#tempfile_path_prefix.); |
| 420 | iterator->tempfile_path_prefixcxx . . $ FLAC__Metadata_SimpleIterator#tempfile_path_prefix. = 0; |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! void FLAC__metadata_simple_iterator_deletecxx . . $ FLAC__metadata_simple_iterator_delete(ce497eb305ff27be).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 425 | { |
| 426 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 427 | |
| 428 | simple_iterator_free_guts_cxx . . $ simple_iterator_free_guts_(ce497eb305ff27be).(iterator); |
| 429 | freecxx . . $ free(5d22bdacc48458e8).(iterator); |
| 430 | } |
| 431 | |
| 432 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# FLAC__metadata_simple_iterator_statuscxx . . $ FLAC__metadata_simple_iterator_status(fe29ebe383d09acb).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 433 | { |
| 434 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# status; |
| 435 | |
| 436 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 437 | |
| 438 | status = iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status.; |
| 439 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 440 | return status; |
| 441 | } |
| 442 | |
| 443 | static FLAC__boolcxx . . $ FLAC__bool# simple_iterator_prime_input_cxx . . $ simple_iterator_prime_input_(180443d5b2343f4c).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__boolcxx . . $ FLAC__bool# read_only) |
| 444 | { |
| 445 | uint32_tcxx . . $ uint32_t# ret; |
| 446 | |
| 447 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 448 | |
| 449 | if(read_only || 0 == (iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file. = flac_fopencxx . . $ `external/flac/flac_share_compat.h:200:9`!(iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename., "r+b"))) { |
| 450 | iterator->is_writablecxx . . $ FLAC__Metadata_SimpleIterator#is_writable. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 451 | if(read_only || errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! == EACCEScxx . . $ `<external>/8987895939074593727/errno-base.h:17:9`!) { |
| 452 | if(0 == (iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file. = flac_fopencxx . . $ `external/flac/flac_share_compat.h:200:9`!(iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename., "rb"))) { |
| 453 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILEcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE.; |
| 454 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 455 | } |
| 456 | } |
| 457 | else { |
| 458 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILEcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE.; |
| 459 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 460 | } |
| 461 | } |
| 462 | else { |
| 463 | iterator->is_writablecxx . . $ FLAC__Metadata_SimpleIterator#is_writable. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 464 | } |
| 465 | |
| 466 | ret = seek_to_first_metadata_block_cxx . . $ seek_to_first_metadata_block_(9eef1996c458a0e7).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file.); |
| 467 | switch(ret) { |
| 468 | case 0: |
| 469 | iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth. = 0; |
| 470 | iterator->first_offsetcxx . . $ FLAC__Metadata_SimpleIterator#first_offset. = iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.] = ftellocxx . . $ ftello(1dcafcd8ef4c6e6c).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file.); |
| 471 | ret = read_metadata_block_header_cxx . . $ read_metadata_block_header_(2e72b239d5ede54f).(iterator); |
| 472 | /* The first metadata block must be a streaminfo. If this is not the |
| 473 | * case, the file is invalid and assumptions made elsewhere in the |
| 474 | * code are invalid */ |
| 475 | if(iterator->typecxx . . $ FLAC__Metadata_SimpleIterator#type. != FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.) { |
| 476 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA.; |
| 477 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 478 | } |
| 479 | return ret; |
| 480 | case 1: |
| 481 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 482 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 483 | case 2: |
| 484 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 485 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 486 | case 3: |
| 487 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILEcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE.; |
| 488 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 489 | default: |
| 490 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0); |
| 491 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | #if 0 |
| 496 | @@@ If we decide to finish implementing this, put this comment back in metadata.h |
| 497 | /* |
| 498 | * The 'tempfile_path_prefix' allows you to specify a directory where |
| 499 | * tempfiles should go. Remember that if your metadata edits cause the |
| 500 | * FLAC file to grow, the entire file will have to be rewritten. If |
| 501 | * 'tempfile_path_prefix' is NULL, the temp file will be written in the |
| 502 | * same directory as the original FLAC file. This makes replacing the |
| 503 | * original with the tempfile fast but requires extra space in the same |
| 504 | * partition for the tempfile. If space is a problem, you can pass a |
| 505 | * directory name belonging to a different partition in |
| 506 | * 'tempfile_path_prefix'. Note that you should use the forward slash |
| 507 | * '/' as the directory separator. A trailing slash is not needed; it |
| 508 | * will be added automatically. |
| 509 | */ |
| 510 | FLAC__bool FLAC__metadata_simple_iterator_init(FLAC__Metadata_SimpleIterator *iterator, const char *filename, FLAC__bool preserve_file_stats, const char *tempfile_path_prefix); |
| 511 | #endif |
| 512 | |
| 513 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_simple_iterator_initcxx . . $ FLAC__metadata_simple_iterator_init(a0981cbd538ed86a).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, const char *filename, FLAC__boolcxx . . $ FLAC__bool# read_only, FLAC__boolcxx . . $ FLAC__bool# preserve_file_stats) |
| 514 | { |
| 515 | const char *tempfile_path_prefix = 0; /*@@@ search for comments near 'flac_rename(...)' for what it will take to finish implementing this */ |
| 516 | |
| 517 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 518 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != filename); |
| 519 | |
| 520 | simple_iterator_free_guts_cxx . . $ simple_iterator_free_guts_(ce497eb305ff27be).(iterator); |
| 521 | |
| 522 | if(!read_only && preserve_file_stats) |
| 523 | iterator->has_statscxx . . $ FLAC__Metadata_SimpleIterator#has_stats. = get_file_stats_cxx . . $ get_file_stats_(a9cd1e23e96f423c).(filename, &iterator->statscxx . . $ FLAC__Metadata_SimpleIterator#stats.); |
| 524 | |
| 525 | if(0 == (iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename. = strdupcxx . . $ strdup(a8b8e32347182212).(filename))) { |
| 526 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 527 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 528 | } |
| 529 | if(0 != tempfile_path_prefix && 0 == (iterator->tempfile_path_prefixcxx . . $ FLAC__Metadata_SimpleIterator#tempfile_path_prefix. = strdupcxx . . $ strdup(a8b8e32347182212).(tempfile_path_prefix))) { |
| 530 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 531 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 532 | } |
| 533 | |
| 534 | return simple_iterator_prime_input_cxx . . $ simple_iterator_prime_input_(180443d5b2343f4c).(iterator, read_only); |
| 535 | } |
| 536 | |
| 537 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_simple_iterator_is_writablecxx . . $ FLAC__metadata_simple_iterator_is_writable(6089dbfd3142606d).(const FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 538 | { |
| 539 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 540 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 541 | |
| 542 | return iterator->is_writablecxx . . $ FLAC__Metadata_SimpleIterator#is_writable.; |
| 543 | } |
| 544 | |
| 545 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_simple_iterator_nextcxx . . $ FLAC__metadata_simple_iterator_next(2e72b239d5ede54f).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 546 | { |
| 547 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 548 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 549 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 550 | |
| 551 | if(iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.) |
| 552 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 553 | |
| 554 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length., SEEK_CURcxx . . $ `<external>/14710646456994434043/fcntl.h:138:10`!)) { |
| 555 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 556 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 557 | } |
| 558 | |
| 559 | iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.] = ftellocxx . . $ ftello(1dcafcd8ef4c6e6c).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file.); |
| 560 | |
| 561 | return read_metadata_block_header_cxx . . $ read_metadata_block_header_(2e72b239d5ede54f).(iterator); |
| 562 | } |
| 563 | |
| 564 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_simple_iterator_prevcxx . . $ FLAC__metadata_simple_iterator_prev(2e72b239d5ede54f).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 565 | { |
| 566 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! this_offset; |
| 567 | |
| 568 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 569 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 570 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 571 | |
| 572 | if(iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.] == iterator->first_offsetcxx . . $ FLAC__Metadata_SimpleIterator#first_offset.) |
| 573 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 574 | |
| 575 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., iterator->first_offsetcxx . . $ FLAC__Metadata_SimpleIterator#first_offset., SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 576 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 577 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 578 | } |
| 579 | this_offset = iterator->first_offsetcxx . . $ FLAC__Metadata_SimpleIterator#first_offset.; |
| 580 | if(!read_metadata_block_header_cxx . . $ read_metadata_block_header_(2e72b239d5ede54f).(iterator)) |
| 581 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 582 | |
| 583 | /* we ignore any error from ftello() and catch it in fseeko() */ |
| 584 | while(ftellocxx . . $ ftello(1dcafcd8ef4c6e6c).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file.) + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. < iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.]) { |
| 585 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length., SEEK_CURcxx . . $ `<external>/14710646456994434043/fcntl.h:138:10`!)) { |
| 586 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 587 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 588 | } |
| 589 | this_offset = ftellocxx . . $ ftello(1dcafcd8ef4c6e6c).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file.); |
| 590 | if(!read_metadata_block_header_cxx . . $ read_metadata_block_header_(2e72b239d5ede54f).(iterator)) |
| 591 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 592 | } |
| 593 | |
| 594 | iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.] = this_offset; |
| 595 | |
| 596 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 597 | } |
| 598 | |
| 599 | /*@@@@add to tests*/ |
| 600 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_simple_iterator_is_lastcxx . . $ FLAC__metadata_simple_iterator_is_last(6089dbfd3142606d).(const FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 601 | { |
| 602 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 603 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 604 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 605 | |
| 606 | return iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.; |
| 607 | } |
| 608 | |
| 609 | /*@@@@add to tests*/ |
| 610 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! off_tcxx . . $ off_t# FLAC__metadata_simple_iterator_get_block_offsetcxx . . $ FLAC__metadata_simple_iterator_get_block_offset(120d38001cd0e11).(const FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 611 | { |
| 612 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 613 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 614 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 615 | |
| 616 | return (off_tcxx . . $ off_t#)iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.]; |
| 617 | } |
| 618 | |
| 619 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__MetadataTypecxx . . $ FLAC__MetadataType# FLAC__metadata_simple_iterator_get_block_typecxx . . $ FLAC__metadata_simple_iterator_get_block_type(1d69f41c657c9289).(const FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 620 | { |
| 621 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 622 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 623 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 624 | |
| 625 | return iterator->typecxx . . $ FLAC__Metadata_SimpleIterator#type.; |
| 626 | } |
| 627 | |
| 628 | /*@@@@add to tests*/ |
| 629 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! uint32_tcxx . . $ uint32_t# FLAC__metadata_simple_iterator_get_block_lengthcxx . . $ FLAC__metadata_simple_iterator_get_block_length(3af81ec865d8638c).(const FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 630 | { |
| 631 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 632 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 633 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 634 | |
| 635 | return iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length.; |
| 636 | } |
| 637 | |
| 638 | /*@@@@add to tests*/ |
| 639 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_simple_iterator_get_application_idcxx . . $ FLAC__metadata_simple_iterator_get_application_id(c225128fc4b877f0).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__bytecxx . . $ FLAC__byte# *id) |
| 640 | { |
| 641 | const uint32_tcxx . . $ uint32_t# id_bytes = FLAC__STREAM_METADATA_APPLICATION_ID_LENcxx . . $ FLAC__STREAM_METADATA_APPLICATION_ID_LEN. / 8; |
| 642 | |
| 643 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 644 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 645 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != id); |
| 646 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 647 | |
| 648 | if(iterator->typecxx . . $ FLAC__Metadata_SimpleIterator#type. != FLAC__METADATA_TYPE_APPLICATIONcxx . . $ FLAC__METADATA_TYPE_APPLICATION.) { |
| 649 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUTcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT.; |
| 650 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 651 | } |
| 652 | |
| 653 | if(freadcxx . . $ fread(738fc8ac1d711e58).(id, 1, id_bytes, iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file.) != id_bytes) { |
| 654 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 655 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 656 | } |
| 657 | |
| 658 | /* back up */ |
| 659 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., -((int)id_bytes), SEEK_CURcxx . . $ `<external>/14710646456994434043/fcntl.h:138:10`!)) { |
| 660 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 661 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 662 | } |
| 663 | |
| 664 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 665 | } |
| 666 | |
| 667 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *FLAC__metadata_simple_iterator_get_blockcxx . . $ FLAC__metadata_simple_iterator_get_block(31b4e092374e9526).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 668 | { |
| 669 | FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block = FLAC__metadata_object_newcxx . . $ FLAC__metadata_object_new(7b74e093a0c25cb4).(iterator->typecxx . . $ FLAC__Metadata_SimpleIterator#type.); |
| 670 | |
| 671 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 672 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 673 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 674 | |
| 675 | if(0 != block) { |
| 676 | block->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.; |
| 677 | block->lengthcxx . . $ FLAC__StreamMetadata#length. = iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length.; |
| 678 | |
| 679 | if(!read_metadata_block_data_cxx . . $ read_metadata_block_data_(24e551a2ffc6da2b).(iterator, block)) { |
| 680 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(block); |
| 681 | return 0; |
| 682 | } |
| 683 | |
| 684 | /* back up to the beginning of the block data to stay consistent */ |
| 685 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.] + FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!, SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 686 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 687 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(block); |
| 688 | return 0; |
| 689 | } |
| 690 | } |
| 691 | else |
| 692 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 693 | |
| 694 | return block; |
| 695 | } |
| 696 | |
| 697 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_simple_iterator_set_blockcxx . . $ FLAC__metadata_simple_iterator_set_block(e6b59472951b3ba4).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block, FLAC__boolcxx . . $ FLAC__bool# use_padding) |
| 698 | { |
| 699 | FLAC__ASSERT_DECLARATIONcxx . . $ `external/flac/flac_FLAC_assert.h:44:9`!(FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! debug_target_offset = iterator->offset[iterator->depth];) |
| 700 | FLAC__boolcxx . . $ FLAC__bool# ret; |
| 701 | |
| 702 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 703 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 704 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != block); |
| 705 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 706 | |
| 707 | if(!iterator->is_writablecxx . . $ FLAC__Metadata_SimpleIterator#is_writable.) { |
| 708 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLEcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE.; |
| 709 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 710 | } |
| 711 | |
| 712 | if(iterator->typecxx . . $ FLAC__Metadata_SimpleIterator#type. == FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO. || block->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.) { |
| 713 | if(iterator->typecxx . . $ FLAC__Metadata_SimpleIterator#type. != block->typecxx . . $ FLAC__StreamMetadata#type.) { |
| 714 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUTcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT.; |
| 715 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 716 | } |
| 717 | } |
| 718 | |
| 719 | block->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.; |
| 720 | |
| 721 | if(iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. == block->lengthcxx . . $ FLAC__StreamMetadata#length.) |
| 722 | return write_metadata_block_stationary_cxx . . $ write_metadata_block_stationary_(606680ad4cb8c5d4).(iterator, block); |
| 723 | else if(iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. > block->lengthcxx . . $ FLAC__StreamMetadata#length.) { |
| 724 | if(use_padding && iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. >= FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + block->lengthcxx . . $ FLAC__StreamMetadata#length.) { |
| 725 | ret = write_metadata_block_stationary_with_padding_cxx . . $ write_metadata_block_stationary_with_padding_(5ee4a6e34e3587d4).(iterator, block, iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. - FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! - block->lengthcxx . . $ FLAC__StreamMetadata#length., block->is_lastcxx . . $ FLAC__StreamMetadata#is_last.); |
| 726 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!ret || iterator->offset[iterator->depth] == debug_target_offset); |
| 727 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!ret || ftello(iterator->file) == debug_target_offset + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 728 | return ret; |
| 729 | } |
| 730 | else { |
| 731 | if((ret = rewrite_whole_file_cxx . . $ rewrite_whole_file_(e6b59472951b3ba4).(iterator, block, /*append=*/falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!))) { |
| 732 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!ret || iterator->offset[iterator->depth] == debug_target_offset); |
| 733 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!ret || ftello(iterator->file) == debug_target_offset + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 734 | } |
| 735 | return ret; |
| 736 | } |
| 737 | } |
| 738 | else /* iterator->length < block->length */ { |
| 739 | uint32_tcxx . . $ uint32_t# padding_leftover = 0; |
| 740 | FLAC__boolcxx . . $ FLAC__bool# padding_is_last = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 741 | if(use_padding) { |
| 742 | /* first see if we can even use padding */ |
| 743 | if(iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.) { |
| 744 | use_padding = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 745 | } |
| 746 | else { |
| 747 | const uint32_tcxx . . $ uint32_t# extra_padding_bytes_required = block->lengthcxx . . $ FLAC__StreamMetadata#length. - iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length.; |
| 748 | simple_iterator_push_cxx . . $ simple_iterator_push_(ce497eb305ff27be).(iterator); |
| 749 | if(!FLAC__metadata_simple_iterator_nextcxx . . $ FLAC__metadata_simple_iterator_next(2e72b239d5ede54f).(iterator)) { |
| 750 | (void)simple_iterator_pop_cxx . . $ simple_iterator_pop_(2e72b239d5ede54f).(iterator); |
| 751 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 752 | } |
| 753 | if(iterator->typecxx . . $ FLAC__Metadata_SimpleIterator#type. != FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.) { |
| 754 | use_padding = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 755 | } |
| 756 | else { |
| 757 | if(FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. == extra_padding_bytes_required) { |
| 758 | padding_leftover = 0; |
| 759 | block->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.; |
| 760 | } |
| 761 | else if(iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. < extra_padding_bytes_required) |
| 762 | use_padding = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 763 | else { |
| 764 | padding_leftover = FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. - extra_padding_bytes_required; |
| 765 | padding_is_last = iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.; |
| 766 | block->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 767 | } |
| 768 | } |
| 769 | if(!simple_iterator_pop_cxx . . $ simple_iterator_pop_(2e72b239d5ede54f).(iterator)) |
| 770 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 771 | } |
| 772 | } |
| 773 | if(use_padding) { |
| 774 | if(padding_leftover == 0) { |
| 775 | ret = write_metadata_block_stationary_cxx . . $ write_metadata_block_stationary_(606680ad4cb8c5d4).(iterator, block); |
| 776 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!ret || iterator->offset[iterator->depth] == debug_target_offset); |
| 777 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!ret || ftello(iterator->file) == debug_target_offset + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 778 | return ret; |
| 779 | } |
| 780 | else { |
| 781 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(padding_leftover >= FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 782 | ret = write_metadata_block_stationary_with_padding_cxx . . $ write_metadata_block_stationary_with_padding_(5ee4a6e34e3587d4).(iterator, block, padding_leftover - FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!, padding_is_last); |
| 783 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!ret || iterator->offset[iterator->depth] == debug_target_offset); |
| 784 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!ret || ftello(iterator->file) == debug_target_offset + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 785 | return ret; |
| 786 | } |
| 787 | } |
| 788 | else { |
| 789 | if((ret = rewrite_whole_file_cxx . . $ rewrite_whole_file_(e6b59472951b3ba4).(iterator, block, /*append=*/falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!))) { |
| 790 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!ret || iterator->offset[iterator->depth] == debug_target_offset); |
| 791 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!ret || ftello(iterator->file) == debug_target_offset + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 792 | } |
| 793 | return ret; |
| 794 | } |
| 795 | } |
| 796 | } |
| 797 | |
| 798 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_simple_iterator_insert_block_aftercxx . . $ FLAC__metadata_simple_iterator_insert_block_after(e6b59472951b3ba4).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block, FLAC__boolcxx . . $ FLAC__bool# use_padding) |
| 799 | { |
| 800 | uint32_tcxx . . $ uint32_t# padding_leftover = 0; |
| 801 | FLAC__boolcxx . . $ FLAC__bool# padding_is_last = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 802 | |
| 803 | FLAC__ASSERT_DECLARATIONcxx . . $ `external/flac/flac_FLAC_assert.h:44:9`!(FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! debug_target_offset = iterator->offset[iterator->depth] + FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + iterator->length;) |
| 804 | FLAC__boolcxx . . $ FLAC__bool# ret; |
| 805 | |
| 806 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 807 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 808 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != block); |
| 809 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 810 | |
| 811 | if(!iterator->is_writablecxx . . $ FLAC__Metadata_SimpleIterator#is_writable.) { |
| 812 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLEcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE.; |
| 813 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 814 | } |
| 815 | |
| 816 | if(block->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.) { |
| 817 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUTcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT.; |
| 818 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 819 | } |
| 820 | |
| 821 | block->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.; |
| 822 | |
| 823 | if(use_padding) { |
| 824 | /* first see if we can even use padding */ |
| 825 | if(iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.) { |
| 826 | use_padding = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 827 | } |
| 828 | else { |
| 829 | simple_iterator_push_cxx . . $ simple_iterator_push_(ce497eb305ff27be).(iterator); |
| 830 | if(!FLAC__metadata_simple_iterator_nextcxx . . $ FLAC__metadata_simple_iterator_next(2e72b239d5ede54f).(iterator)) { |
| 831 | (void)simple_iterator_pop_cxx . . $ simple_iterator_pop_(2e72b239d5ede54f).(iterator); |
| 832 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 833 | } |
| 834 | if(iterator->typecxx . . $ FLAC__Metadata_SimpleIterator#type. != FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.) { |
| 835 | use_padding = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 836 | } |
| 837 | else { |
| 838 | if(iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. == block->lengthcxx . . $ FLAC__StreamMetadata#length.) { |
| 839 | padding_leftover = 0; |
| 840 | block->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.; |
| 841 | } |
| 842 | else if(iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. < FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + block->lengthcxx . . $ FLAC__StreamMetadata#length.) |
| 843 | use_padding = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 844 | else { |
| 845 | padding_leftover = iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. - block->lengthcxx . . $ FLAC__StreamMetadata#length.; |
| 846 | padding_is_last = iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.; |
| 847 | block->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 848 | } |
| 849 | } |
| 850 | if(!simple_iterator_pop_cxx . . $ simple_iterator_pop_(2e72b239d5ede54f).(iterator)) |
| 851 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 852 | } |
| 853 | } |
| 854 | if(use_padding) { |
| 855 | /* move to the next block, which is suitable padding */ |
| 856 | if(!FLAC__metadata_simple_iterator_nextcxx . . $ FLAC__metadata_simple_iterator_next(2e72b239d5ede54f).(iterator)) |
| 857 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 858 | if(padding_leftover == 0) { |
| 859 | ret = write_metadata_block_stationary_cxx . . $ write_metadata_block_stationary_(606680ad4cb8c5d4).(iterator, block); |
| 860 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->offset[iterator->depth] == debug_target_offset); |
| 861 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(ftello(iterator->file) == debug_target_offset + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 862 | return ret; |
| 863 | } |
| 864 | else { |
| 865 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(padding_leftover >= FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 866 | ret = write_metadata_block_stationary_with_padding_cxx . . $ write_metadata_block_stationary_with_padding_(5ee4a6e34e3587d4).(iterator, block, padding_leftover - FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!, padding_is_last); |
| 867 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->offset[iterator->depth] == debug_target_offset); |
| 868 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(ftello(iterator->file) == debug_target_offset + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 869 | return ret; |
| 870 | } |
| 871 | } |
| 872 | else { |
| 873 | if((ret = rewrite_whole_file_cxx . . $ rewrite_whole_file_(e6b59472951b3ba4).(iterator, block, /*append=*/truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!))) { |
| 874 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->offset[iterator->depth] == debug_target_offset); |
| 875 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(ftello(iterator->file) == debug_target_offset + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 876 | } |
| 877 | return ret; |
| 878 | } |
| 879 | } |
| 880 | |
| 881 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_simple_iterator_delete_blockcxx . . $ FLAC__metadata_simple_iterator_delete_block(180443d5b2343f4c).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__boolcxx . . $ FLAC__bool# use_padding) |
| 882 | { |
| 883 | FLAC__ASSERT_DECLARATIONcxx . . $ `external/flac/flac_FLAC_assert.h:44:9`!(FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! debug_target_offset = iterator->offset[iterator->depth];) |
| 884 | FLAC__boolcxx . . $ FLAC__bool# ret; |
| 885 | |
| 886 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK); |
| 887 | |
| 888 | if(!iterator->is_writablecxx . . $ FLAC__Metadata_SimpleIterator#is_writable.) { |
| 889 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLEcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE.; |
| 890 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 891 | } |
| 892 | |
| 893 | if(iterator->typecxx . . $ FLAC__Metadata_SimpleIterator#type. == FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.) { |
| 894 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUTcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT.; |
| 895 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 896 | } |
| 897 | |
| 898 | if(use_padding) { |
| 899 | FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *padding = FLAC__metadata_object_newcxx . . $ FLAC__metadata_object_new(7b74e093a0c25cb4).(FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.); |
| 900 | if(0 == padding) { |
| 901 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 902 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 903 | } |
| 904 | padding->lengthcxx . . $ FLAC__StreamMetadata#length. = iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length.; |
| 905 | if(!FLAC__metadata_simple_iterator_set_blockcxx . . $ FLAC__metadata_simple_iterator_set_block(e6b59472951b3ba4).(iterator, padding, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!)) { |
| 906 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(padding); |
| 907 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 908 | } |
| 909 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(padding); |
| 910 | if(!FLAC__metadata_simple_iterator_prevcxx . . $ FLAC__metadata_simple_iterator_prev(2e72b239d5ede54f).(iterator)) |
| 911 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 912 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->offset[iterator->depth] + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)iterator->length == debug_target_offset); |
| 913 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(ftello(iterator->file) + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)iterator->length == debug_target_offset); |
| 914 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 915 | } |
| 916 | else { |
| 917 | if((ret = rewrite_whole_file_cxx . . $ rewrite_whole_file_(e6b59472951b3ba4).(iterator, 0, /*append=*/falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!))) { |
| 918 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->offset[iterator->depth] + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)iterator->length == debug_target_offset); |
| 919 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(ftello(iterator->file) + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)iterator->length == debug_target_offset); |
| 920 | } |
| 921 | return ret; |
| 922 | } |
| 923 | } |
| 924 | |
| 925 | |
| 926 | |
| 927 | /**************************************************************************** |
| 928 | * |
| 929 | * Level 2 implementation |
| 930 | * |
| 931 | ***************************************************************************/ |
| 932 | |
| 933 | |
| 934 | typedef struct FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# { |
| 935 | FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *datacxx . . $ FLAC__Metadata_Node#data.; |
| 936 | struct FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *prevcxx . . $ FLAC__Metadata_Node#prev., *nextcxx . . $ FLAC__Metadata_Node#next.; |
| 937 | } FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node#; |
| 938 | |
| 939 | struct FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# { |
| 940 | char *filenamecxx . . $ FLAC__Metadata_Chain#filename.; /* will be NULL if using callbacks */ |
| 941 | FLAC__boolcxx . . $ FLAC__bool# is_oggcxx . . $ FLAC__Metadata_Chain#is_ogg.; |
| 942 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *headcxx . . $ FLAC__Metadata_Chain#head.; |
| 943 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *tailcxx . . $ FLAC__Metadata_Chain#tail.; |
| 944 | uint32_tcxx . . $ uint32_t# nodescxx . . $ FLAC__Metadata_Chain#nodes.; |
| 945 | FLAC__Metadata_ChainStatuscxx . . $ FLAC__Metadata_ChainStatus# statuscxx . . $ FLAC__Metadata_Chain#status.; |
| 946 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! first_offsetcxx . . $ FLAC__Metadata_Chain#first_offset., last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset.; |
| 947 | /* |
| 948 | * This is the length of the chain initially read from the FLAC file. |
| 949 | * it is used to compare against the current length to decide whether |
| 950 | * or not the whole file has to be rewritten. |
| 951 | */ |
| 952 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length.; |
| 953 | /* @@@ hacky, these are currently only needed by ogg reader */ |
| 954 | FLAC__IOHandlecxx . . $ FLAC__IOHandle# handlecxx . . $ FLAC__Metadata_Chain#handle.; |
| 955 | FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cbcxx . . $ FLAC__Metadata_Chain#read_cb.; |
| 956 | }; |
| 957 | |
| 958 | struct FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# { |
| 959 | FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chaincxx . . $ FLAC__Metadata_Iterator#chain.; |
| 960 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *currentcxx . . $ FLAC__Metadata_Iterator#current.; |
| 961 | }; |
| 962 | |
| 963 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! const char * const FLAC__Metadata_ChainStatusStringcxx . . $ FLAC__Metadata_ChainStatusString.[] = { |
| 964 | "FLAC__METADATA_CHAIN_STATUS_OK", |
| 965 | "FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUT", |
| 966 | "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE", |
| 967 | "FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILE", |
| 968 | "FLAC__METADATA_CHAIN_STATUS_NOT_WRITABLE", |
| 969 | "FLAC__METADATA_CHAIN_STATUS_BAD_METADATA", |
| 970 | "FLAC__METADATA_CHAIN_STATUS_READ_ERROR", |
| 971 | "FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR", |
| 972 | "FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR", |
| 973 | "FLAC__METADATA_CHAIN_STATUS_RENAME_ERROR", |
| 974 | "FLAC__METADATA_CHAIN_STATUS_UNLINK_ERROR", |
| 975 | "FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR", |
| 976 | "FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR", |
| 977 | "FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKS", |
| 978 | "FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH", |
| 979 | "FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL" |
| 980 | }; |
| 981 | |
| 982 | |
| 983 | static FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node_new_cxx . . $ node_new_(6adf7f5d56df1c30).(void) |
| 984 | { |
| 985 | return calloccxx . . $ calloc(63a7bf2941bfcd7a).(1, sizeof(FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node#)); |
| 986 | } |
| 987 | |
| 988 | static void node_delete_cxx . . $ node_delete_(2ef9923323f974c0).(FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node) |
| 989 | { |
| 990 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != node); |
| 991 | if(0 != node->datacxx . . $ FLAC__Metadata_Node#data.) |
| 992 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(node->datacxx . . $ FLAC__Metadata_Node#data.); |
| 993 | freecxx . . $ free(5d22bdacc48458e8).(node); |
| 994 | } |
| 995 | |
| 996 | static void chain_init_cxx . . $ chain_init_(bf4c9dce2764a4b0).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain) |
| 997 | { |
| 998 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 999 | |
| 1000 | chain->filenamecxx . . $ FLAC__Metadata_Chain#filename. = 0; |
| 1001 | chain->is_oggcxx . . $ FLAC__Metadata_Chain#is_ogg. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1002 | chain->headcxx . . $ FLAC__Metadata_Chain#head. = chain->tailcxx . . $ FLAC__Metadata_Chain#tail. = 0; |
| 1003 | chain->nodescxx . . $ FLAC__Metadata_Chain#nodes. = 0; |
| 1004 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_OKcxx . . $ FLAC__METADATA_CHAIN_STATUS_OK.; |
| 1005 | chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. = 0; |
| 1006 | chain->read_cbcxx . . $ FLAC__Metadata_Chain#read_cb. = 0; |
| 1007 | } |
| 1008 | |
| 1009 | static void chain_clear_cxx . . $ chain_clear_(bf4c9dce2764a4b0).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain) |
| 1010 | { |
| 1011 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node, *next; |
| 1012 | |
| 1013 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1014 | |
| 1015 | for(node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; ) { |
| 1016 | next = node->nextcxx . . $ FLAC__Metadata_Node#next.; |
| 1017 | node_delete_cxx . . $ node_delete_(2ef9923323f974c0).(node); |
| 1018 | node = next; |
| 1019 | } |
| 1020 | |
| 1021 | if(0 != chain->filenamecxx . . $ FLAC__Metadata_Chain#filename.) |
| 1022 | freecxx . . $ free(5d22bdacc48458e8).(chain->filenamecxx . . $ FLAC__Metadata_Chain#filename.); |
| 1023 | |
| 1024 | chain_init_cxx . . $ chain_init_(bf4c9dce2764a4b0).(chain); |
| 1025 | } |
| 1026 | |
| 1027 | static void chain_append_node_cxx . . $ chain_append_node_(9e55dd69b0dd5d98).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node) |
| 1028 | { |
| 1029 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1030 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != node); |
| 1031 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != node->data); |
| 1032 | |
| 1033 | node->nextcxx . . $ FLAC__Metadata_Node#next. = node->prevcxx . . $ FLAC__Metadata_Node#prev. = 0; |
| 1034 | node->datacxx . . $ FLAC__Metadata_Node#data.->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1035 | if(0 != chain->tailcxx . . $ FLAC__Metadata_Chain#tail.) |
| 1036 | chain->tailcxx . . $ FLAC__Metadata_Chain#tail.->datacxx . . $ FLAC__Metadata_Node#data.->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1037 | |
| 1038 | if(0 == chain->headcxx . . $ FLAC__Metadata_Chain#head.) |
| 1039 | chain->headcxx . . $ FLAC__Metadata_Chain#head. = node; |
| 1040 | else { |
| 1041 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain->tail); |
| 1042 | chain->tailcxx . . $ FLAC__Metadata_Chain#tail.->nextcxx . . $ FLAC__Metadata_Node#next. = node; |
| 1043 | node->prevcxx . . $ FLAC__Metadata_Node#prev. = chain->tailcxx . . $ FLAC__Metadata_Chain#tail.; |
| 1044 | } |
| 1045 | chain->tailcxx . . $ FLAC__Metadata_Chain#tail. = node; |
| 1046 | chain->nodescxx . . $ FLAC__Metadata_Chain#nodes.++; |
| 1047 | } |
| 1048 | |
| 1049 | static void chain_remove_node_cxx . . $ chain_remove_node_(9e55dd69b0dd5d98).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node) |
| 1050 | { |
| 1051 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1052 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != node); |
| 1053 | |
| 1054 | if(node == chain->headcxx . . $ FLAC__Metadata_Chain#head.) |
| 1055 | chain->headcxx . . $ FLAC__Metadata_Chain#head. = node->nextcxx . . $ FLAC__Metadata_Node#next.; |
| 1056 | else |
| 1057 | node->prevcxx . . $ FLAC__Metadata_Node#prev.->nextcxx . . $ FLAC__Metadata_Node#next. = node->nextcxx . . $ FLAC__Metadata_Node#next.; |
| 1058 | |
| 1059 | if(node == chain->tailcxx . . $ FLAC__Metadata_Chain#tail.) |
| 1060 | chain->tailcxx . . $ FLAC__Metadata_Chain#tail. = node->prevcxx . . $ FLAC__Metadata_Node#prev.; |
| 1061 | else |
| 1062 | node->nextcxx . . $ FLAC__Metadata_Node#next.->prevcxx . . $ FLAC__Metadata_Node#prev. = node->prevcxx . . $ FLAC__Metadata_Node#prev.; |
| 1063 | |
| 1064 | if(0 != chain->tailcxx . . $ FLAC__Metadata_Chain#tail.) |
| 1065 | chain->tailcxx . . $ FLAC__Metadata_Chain#tail.->datacxx . . $ FLAC__Metadata_Node#data.->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1066 | |
| 1067 | chain->nodescxx . . $ FLAC__Metadata_Chain#nodes.--; |
| 1068 | } |
| 1069 | |
| 1070 | static void chain_delete_node_cxx . . $ chain_delete_node_(9e55dd69b0dd5d98).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node) |
| 1071 | { |
| 1072 | chain_remove_node_cxx . . $ chain_remove_node_(9e55dd69b0dd5d98).(chain, node); |
| 1073 | node_delete_cxx . . $ node_delete_(2ef9923323f974c0).(node); |
| 1074 | } |
| 1075 | |
| 1076 | static FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! chain_calculate_length_cxx . . $ chain_calculate_length_(f01485accea8edd7).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain) |
| 1077 | { |
| 1078 | const FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1079 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! length = 0; |
| 1080 | for(node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; node = node->nextcxx . . $ FLAC__Metadata_Node#next.) |
| 1081 | length += (FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 1082 | return length; |
| 1083 | } |
| 1084 | |
| 1085 | static void iterator_insert_node_cxx . . $ iterator_insert_node_(c0bd230a153a627).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator, FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node) |
| 1086 | { |
| 1087 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != node); |
| 1088 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != node->data); |
| 1089 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 1090 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->current); |
| 1091 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->chain); |
| 1092 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->chain->head); |
| 1093 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->chain->tail); |
| 1094 | |
| 1095 | node->datacxx . . $ FLAC__Metadata_Node#data.->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1096 | |
| 1097 | node->prevcxx . . $ FLAC__Metadata_Node#prev. = iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->prevcxx . . $ FLAC__Metadata_Node#prev.; |
| 1098 | node->nextcxx . . $ FLAC__Metadata_Node#next. = iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.; |
| 1099 | |
| 1100 | if(0 == node->prevcxx . . $ FLAC__Metadata_Node#prev.) |
| 1101 | iterator->chaincxx . . $ FLAC__Metadata_Iterator#chain.->headcxx . . $ FLAC__Metadata_Chain#head. = node; |
| 1102 | else |
| 1103 | node->prevcxx . . $ FLAC__Metadata_Node#prev.->nextcxx . . $ FLAC__Metadata_Node#next. = node; |
| 1104 | |
| 1105 | iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->prevcxx . . $ FLAC__Metadata_Node#prev. = node; |
| 1106 | |
| 1107 | iterator->chaincxx . . $ FLAC__Metadata_Iterator#chain.->nodescxx . . $ FLAC__Metadata_Chain#nodes.++; |
| 1108 | } |
| 1109 | |
| 1110 | static void iterator_insert_node_after_cxx . . $ iterator_insert_node_after_(c0bd230a153a627).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator, FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node) |
| 1111 | { |
| 1112 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != node); |
| 1113 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != node->data); |
| 1114 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 1115 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->current); |
| 1116 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->chain); |
| 1117 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->chain->head); |
| 1118 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->chain->tail); |
| 1119 | |
| 1120 | iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->datacxx . . $ FLAC__Metadata_Node#data.->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1121 | |
| 1122 | node->prevcxx . . $ FLAC__Metadata_Node#prev. = iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.; |
| 1123 | node->nextcxx . . $ FLAC__Metadata_Node#next. = iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->nextcxx . . $ FLAC__Metadata_Node#next.; |
| 1124 | |
| 1125 | if(0 == node->nextcxx . . $ FLAC__Metadata_Node#next.) |
| 1126 | iterator->chaincxx . . $ FLAC__Metadata_Iterator#chain.->tailcxx . . $ FLAC__Metadata_Chain#tail. = node; |
| 1127 | else |
| 1128 | node->nextcxx . . $ FLAC__Metadata_Node#next.->prevcxx . . $ FLAC__Metadata_Node#prev. = node; |
| 1129 | |
| 1130 | node->prevcxx . . $ FLAC__Metadata_Node#prev.->nextcxx . . $ FLAC__Metadata_Node#next. = node; |
| 1131 | |
| 1132 | iterator->chaincxx . . $ FLAC__Metadata_Iterator#chain.->tailcxx . . $ FLAC__Metadata_Chain#tail.->datacxx . . $ FLAC__Metadata_Node#data.->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1133 | |
| 1134 | iterator->chaincxx . . $ FLAC__Metadata_Iterator#chain.->nodescxx . . $ FLAC__Metadata_Chain#nodes.++; |
| 1135 | } |
| 1136 | |
| 1137 | /* return true iff node and node->next are both padding */ |
| 1138 | static FLAC__boolcxx . . $ FLAC__bool# chain_merge_adjacent_padding_cxx . . $ chain_merge_adjacent_padding_(9fef7d02ce26e7fa).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node) |
| 1139 | { |
| 1140 | if(node->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING. && 0 != node->nextcxx . . $ FLAC__Metadata_Node#next. && node->nextcxx . . $ FLAC__Metadata_Node#next.->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.) { |
| 1141 | const uint32_tcxx . . $ uint32_t# growth = FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + node->nextcxx . . $ FLAC__Metadata_Node#next.->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length.; |
| 1142 | node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. += growth; /* new block size can be greater than max metadata block size, but it'll be fixed later in chain_prepare_for_write_() */ |
| 1143 | |
| 1144 | chain_delete_node_cxx . . $ chain_delete_node_(9e55dd69b0dd5d98).(chain, node->nextcxx . . $ FLAC__Metadata_Node#next.); |
| 1145 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1146 | } |
| 1147 | else |
| 1148 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1149 | } |
| 1150 | |
| 1151 | #if defined(_MSC_VER) |
| 1152 | // silence three MSVC warnings 'conversion from 'conversion from 'const __int64' to 'uint32_t', possible loss of data' |
| 1153 | #pragma warning ( disable : 4244 ) |
| 1154 | #endif |
| 1155 | |
| 1156 | /* Returns the new length of the chain, or 0 if there was an error. */ |
| 1157 | /* WATCHOUT: This can get called multiple times before a write, so |
| 1158 | * it should still work when this happens. |
| 1159 | */ |
| 1160 | /* WATCHOUT: Make sure to also update the logic in |
| 1161 | * FLAC__metadata_chain_check_if_tempfile_needed() if the logic here changes. |
| 1162 | */ |
| 1163 | static FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! chain_prepare_for_write_cxx . . $ chain_prepare_for_write_(5b23599c1fbc7e91).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__boolcxx . . $ FLAC__bool# use_padding) |
| 1164 | { |
| 1165 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! current_length = chain_calculate_length_cxx . . $ chain_calculate_length_(f01485accea8edd7).(chain); |
| 1166 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# * i; |
| 1167 | |
| 1168 | /* Check all is_last settings on the blocks */ |
| 1169 | for(i = chain->headcxx . . $ FLAC__Metadata_Chain#head.; i->nextcxx . . $ FLAC__Metadata_Node#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; i = i->nextcxx . . $ FLAC__Metadata_Node#next.) |
| 1170 | i->datacxx . . $ FLAC__Metadata_Node#data.->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = 0; |
| 1171 | chain->tailcxx . . $ FLAC__Metadata_Chain#tail.->datacxx . . $ FLAC__Metadata_Node#data.->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = 1; |
| 1172 | |
| 1173 | if(use_padding) { |
| 1174 | /* if the metadata shrank and the last block is padding, we just extend the last padding block */ |
| 1175 | if(current_length < chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. && chain->tailcxx . . $ FLAC__Metadata_Chain#tail.->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.) { |
| 1176 | const FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! delta = chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. - current_length; |
| 1177 | chain->tailcxx . . $ FLAC__Metadata_Chain#tail.->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. += delta; |
| 1178 | current_length += delta; |
| 1179 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(current_length == chain->initial_length); |
| 1180 | } |
| 1181 | /* if the metadata shrank more than 4 bytes then there's room to add another padding block */ |
| 1182 | else if(current_length + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! <= chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length.) { |
| 1183 | FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *padding; |
| 1184 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1185 | if(0 == (padding = FLAC__metadata_object_newcxx . . $ FLAC__metadata_object_new(7b74e093a0c25cb4).(FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.))) { |
| 1186 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 1187 | return 0; |
| 1188 | } |
| 1189 | padding->lengthcxx . . $ FLAC__StreamMetadata#length. = chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. - (FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + current_length); |
| 1190 | if(0 == (node = node_new_cxx . . $ node_new_(6adf7f5d56df1c30).())) { |
| 1191 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(padding); |
| 1192 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 1193 | return 0; |
| 1194 | } |
| 1195 | node->datacxx . . $ FLAC__Metadata_Node#data. = padding; |
| 1196 | chain_append_node_cxx . . $ chain_append_node_(9e55dd69b0dd5d98).(chain, node); |
| 1197 | current_length = chain_calculate_length_cxx . . $ chain_calculate_length_(f01485accea8edd7).(chain); |
| 1198 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(current_length == chain->initial_length); |
| 1199 | } |
| 1200 | /* if the metadata grew but the last block is padding, try cutting the padding to restore the original length so we don't have to rewrite the whole file */ |
| 1201 | else if(current_length > chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length.) { |
| 1202 | const FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! delta = current_length - chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length.; |
| 1203 | if(chain->tailcxx . . $ FLAC__Metadata_Chain#tail.->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.) { |
| 1204 | /* if the delta is exactly the size of the last padding block, remove the padding block */ |
| 1205 | if((FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)chain->tailcxx . . $ FLAC__Metadata_Chain#tail.->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! == delta) { |
| 1206 | chain_delete_node_cxx . . $ chain_delete_node_(9e55dd69b0dd5d98).(chain, chain->tailcxx . . $ FLAC__Metadata_Chain#tail.); |
| 1207 | current_length = chain_calculate_length_cxx . . $ chain_calculate_length_(f01485accea8edd7).(chain); |
| 1208 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(current_length == chain->initial_length); |
| 1209 | } |
| 1210 | /* if there is at least 'delta' bytes of padding, trim the padding down */ |
| 1211 | else if((FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)chain->tailcxx . . $ FLAC__Metadata_Chain#tail.->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. >= delta) { |
| 1212 | chain->tailcxx . . $ FLAC__Metadata_Chain#tail.->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. -= delta; |
| 1213 | current_length -= delta; |
| 1214 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(current_length == chain->initial_length); |
| 1215 | } |
| 1216 | } |
| 1217 | } |
| 1218 | } |
| 1219 | |
| 1220 | /* check sizes of all metadata blocks; reduce padding size if necessary */ |
| 1221 | { |
| 1222 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1223 | for (node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; node = node->nextcxx . . $ FLAC__Metadata_Node#next.) { |
| 1224 | if(node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. >= (1u << FLAC__STREAM_METADATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_LENGTH_LEN.)) { |
| 1225 | if(node->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.) { |
| 1226 | node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. = (1u << FLAC__STREAM_METADATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_LENGTH_LEN.) - 1; |
| 1227 | current_length = chain_calculate_length_cxx . . $ chain_calculate_length_(f01485accea8edd7).(chain); |
| 1228 | } else { |
| 1229 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_CHAIN_STATUS_BAD_METADATA.; |
| 1230 | return 0; |
| 1231 | } |
| 1232 | } |
| 1233 | } |
| 1234 | } |
| 1235 | |
| 1236 | return current_length; |
| 1237 | } |
| 1238 | |
| 1239 | #if defined(_MSC_VER) |
| 1240 | #pragma warning ( default : 4244 ) |
| 1241 | #endif |
| 1242 | |
| 1243 | static FLAC__boolcxx . . $ FLAC__bool# chain_read_cb_cxx . . $ chain_read_cb_(9a946509894725e2).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb, FLAC__IOCallback_Tellcxx . . $ FLAC__IOCallback_Tell# tell_cb) |
| 1244 | { |
| 1245 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1246 | |
| 1247 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1248 | |
| 1249 | /* we assume we're already at the beginning of the file */ |
| 1250 | |
| 1251 | switch(seek_to_first_metadata_block_cb_cxx . . $ seek_to_first_metadata_block_cb_(7e14ee485b111c9a).(handle, read_cb, seek_cb)) { |
| 1252 | case 0: |
| 1253 | break; |
| 1254 | case 1: |
| 1255 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_READ_ERROR.; |
| 1256 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1257 | case 2: |
| 1258 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR.; |
| 1259 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1260 | case 3: |
| 1261 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILEcxx . . $ FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILE.; |
| 1262 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1263 | default: |
| 1264 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0); |
| 1265 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1266 | } |
| 1267 | |
| 1268 | { |
| 1269 | FLAC__int64cxx . . $ FLAC__int64# pos = tell_cb(handle); |
| 1270 | if(pos < 0) { |
| 1271 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_READ_ERROR.; |
| 1272 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1273 | } |
| 1274 | chain->first_offsetcxx . . $ FLAC__Metadata_Chain#first_offset. = (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)pos; |
| 1275 | } |
| 1276 | |
| 1277 | { |
| 1278 | FLAC__boolcxx . . $ FLAC__bool# is_last; |
| 1279 | FLAC__MetadataTypecxx . . $ FLAC__MetadataType# type; |
| 1280 | uint32_tcxx . . $ uint32_t# length; |
| 1281 | |
| 1282 | do { |
| 1283 | node = node_new_cxx . . $ node_new_(6adf7f5d56df1c30).(); |
| 1284 | if(0 == node) { |
| 1285 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 1286 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1287 | } |
| 1288 | |
| 1289 | if(!read_metadata_block_header_cb_cxx . . $ read_metadata_block_header_cb_(5c638d57e53399a4).(handle, read_cb, &is_last, &type, &length)) { |
| 1290 | node_delete_cxx . . $ node_delete_(2ef9923323f974c0).(node); |
| 1291 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_READ_ERROR.; |
| 1292 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1293 | } |
| 1294 | |
| 1295 | node->datacxx . . $ FLAC__Metadata_Node#data. = FLAC__metadata_object_newcxx . . $ FLAC__metadata_object_new(7b74e093a0c25cb4).(type); |
| 1296 | if(0 == node->datacxx . . $ FLAC__Metadata_Node#data.) { |
| 1297 | node_delete_cxx . . $ node_delete_(2ef9923323f974c0).(node); |
| 1298 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 1299 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1300 | } |
| 1301 | |
| 1302 | node->datacxx . . $ FLAC__Metadata_Node#data.->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = is_last; |
| 1303 | node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. = length; |
| 1304 | |
| 1305 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(read_metadata_block_data_cb_cxx . . $ read_metadata_block_data_cb_(4233a43fc2cc3a52).(handle, read_cb, seek_cb, node->datacxx . . $ FLAC__Metadata_Node#data.)); |
| 1306 | if(chain->statuscxx . . $ FLAC__Metadata_Chain#status. != FLAC__METADATA_CHAIN_STATUS_OKcxx . . $ FLAC__METADATA_CHAIN_STATUS_OK.) { |
| 1307 | node_delete_cxx . . $ node_delete_(2ef9923323f974c0).(node); |
| 1308 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1309 | } |
| 1310 | chain_append_node_cxx . . $ chain_append_node_(9e55dd69b0dd5d98).(chain, node); |
| 1311 | } while(!is_last); |
| 1312 | } |
| 1313 | |
| 1314 | { |
| 1315 | FLAC__int64cxx . . $ FLAC__int64# pos = tell_cb(handle); |
| 1316 | if(pos < 0) { |
| 1317 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_READ_ERROR.; |
| 1318 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1319 | } |
| 1320 | chain->last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset. = (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)pos; |
| 1321 | } |
| 1322 | |
| 1323 | if(chain->headcxx . . $ FLAC__Metadata_Chain#head.->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. != FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.) { |
| 1324 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_CHAIN_STATUS_BAD_METADATA.; |
| 1325 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1326 | } |
| 1327 | |
| 1328 | chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. = chain_calculate_length_cxx . . $ chain_calculate_length_(f01485accea8edd7).(chain); |
| 1329 | |
| 1330 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1331 | } |
| 1332 | |
| 1333 | static FLAC__StreamDecoderReadStatuscxx . . $ FLAC__StreamDecoderReadStatus# chain_read_ogg_read_cb_cxx . . $ chain_read_ogg_read_cb_(96f630744ee4379c).(const FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder, FLAC__bytecxx . . $ FLAC__byte# buffer[], size_tcxx . . $ size_t# *bytes, void *client_data) |
| 1334 | { |
| 1335 | FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain = (FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain#*)client_data; |
| 1336 | (void)decoder; |
| 1337 | if(*bytes > 0 && chain->statuscxx . . $ FLAC__Metadata_Chain#status. == FLAC__METADATA_CHAIN_STATUS_OKcxx . . $ FLAC__METADATA_CHAIN_STATUS_OK.) { |
| 1338 | *bytes = chain->read_cbcxx . . $ FLAC__Metadata_Chain#read_cb.(buffer, sizeof(FLAC__bytecxx . . $ FLAC__byte#), *bytes, chain->handlecxx . . $ FLAC__Metadata_Chain#handle.); |
| 1339 | if(*bytes == 0) |
| 1340 | return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAMcxx . . $ FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM.; |
| 1341 | else |
| 1342 | return FLAC__STREAM_DECODER_READ_STATUS_CONTINUEcxx . . $ FLAC__STREAM_DECODER_READ_STATUS_CONTINUE.; |
| 1343 | } |
| 1344 | else |
| 1345 | return FLAC__STREAM_DECODER_READ_STATUS_ABORTcxx . . $ FLAC__STREAM_DECODER_READ_STATUS_ABORT.; |
| 1346 | } |
| 1347 | |
| 1348 | static FLAC__StreamDecoderWriteStatuscxx . . $ FLAC__StreamDecoderWriteStatus# chain_read_ogg_write_cb_cxx . . $ chain_read_ogg_write_cb_(8375096e9a6e9bab).(const FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder, const FLAC__Framecxx . . $ FLAC__Frame# *frame, const FLAC__int32cxx . . $ FLAC__int32# * const buffer[], void *client_data) |
| 1349 | { |
| 1350 | (void)decoder, (void)frame, (void)buffer, (void)client_data; |
| 1351 | return FLAC__STREAM_DECODER_WRITE_STATUS_ABORTcxx . . $ FLAC__STREAM_DECODER_WRITE_STATUS_ABORT.; |
| 1352 | } |
| 1353 | |
| 1354 | static void chain_read_ogg_metadata_cb_cxx . . $ chain_read_ogg_metadata_cb_(6339de7fa1cf73d0).(const FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *metadata, void *client_data) |
| 1355 | { |
| 1356 | FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain = (FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain#*)client_data; |
| 1357 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1358 | |
| 1359 | (void)decoder; |
| 1360 | |
| 1361 | node = node_new_cxx . . $ node_new_(6adf7f5d56df1c30).(); |
| 1362 | if(0 == node) { |
| 1363 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 1364 | return; |
| 1365 | } |
| 1366 | |
| 1367 | node->datacxx . . $ FLAC__Metadata_Node#data. = FLAC__metadata_object_clonecxx . . $ FLAC__metadata_object_clone(3ba84a9741e92d18).(metadata); |
| 1368 | if(0 == node->datacxx . . $ FLAC__Metadata_Node#data.) { |
| 1369 | node_delete_cxx . . $ node_delete_(2ef9923323f974c0).(node); |
| 1370 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 1371 | return; |
| 1372 | } |
| 1373 | |
| 1374 | chain_append_node_cxx . . $ chain_append_node_(9e55dd69b0dd5d98).(chain, node); |
| 1375 | } |
| 1376 | |
| 1377 | static void chain_read_ogg_error_cb_cxx . . $ chain_read_ogg_error_cb_(56d9ba04c86f7e6d).(const FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder, FLAC__StreamDecoderErrorStatuscxx . . $ FLAC__StreamDecoderErrorStatus# status, void *client_data) |
| 1378 | { |
| 1379 | FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain = (FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain#*)client_data; |
| 1380 | (void)decoder, (void)status; |
| 1381 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR.; /*@@@ maybe needs better error code */ |
| 1382 | } |
| 1383 | |
| 1384 | static FLAC__boolcxx . . $ FLAC__bool# chain_read_ogg_cb_cxx . . $ chain_read_ogg_cb_(68ff6dcec56ed976).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb) |
| 1385 | { |
| 1386 | FLAC__StreamDecodercxx . . $ FLAC__StreamDecoder# *decoder; |
| 1387 | |
| 1388 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1389 | |
| 1390 | /* we assume we're already at the beginning of the file */ |
| 1391 | |
| 1392 | chain->handlecxx . . $ FLAC__Metadata_Chain#handle. = handle; |
| 1393 | chain->read_cbcxx . . $ FLAC__Metadata_Chain#read_cb. = read_cb; |
| 1394 | if(0 == (decoder = FLAC__stream_decoder_newcxx . . $ FLAC__stream_decoder_new(7336f55c5f66a48b).())) { |
| 1395 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 1396 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1397 | } |
| 1398 | FLAC__stream_decoder_set_metadata_respond_allcxx . . $ FLAC__stream_decoder_set_metadata_respond_all(d92048749c4f1284).(decoder); |
| 1399 | if(FLAC__stream_decoder_init_ogg_streamcxx . . $ FLAC__stream_decoder_init_ogg_stream(fc0e47a783f86a6a).(decoder, chain_read_ogg_read_cb_cxx . . $ chain_read_ogg_read_cb_(96f630744ee4379c)., /*seek_callback=*/0, /*tell_callback=*/0, /*length_callback=*/0, /*eof_callback=*/0, chain_read_ogg_write_cb_cxx . . $ chain_read_ogg_write_cb_(8375096e9a6e9bab)., chain_read_ogg_metadata_cb_cxx . . $ chain_read_ogg_metadata_cb_(6339de7fa1cf73d0)., chain_read_ogg_error_cb_cxx . . $ chain_read_ogg_error_cb_(56d9ba04c86f7e6d)., chain) != FLAC__STREAM_DECODER_INIT_STATUS_OKcxx . . $ FLAC__STREAM_DECODER_INIT_STATUS_OK.) { |
| 1400 | FLAC__stream_decoder_deletecxx . . $ FLAC__stream_decoder_delete(1ffd9838c68f2516).(decoder); |
| 1401 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR.; /*@@@ maybe needs better error code */ |
| 1402 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1403 | } |
| 1404 | |
| 1405 | chain->first_offsetcxx . . $ FLAC__Metadata_Chain#first_offset. = 0; /*@@@ wrong; will need to be set correctly to implement metadata writing for Ogg FLAC */ |
| 1406 | |
| 1407 | if(!FLAC__stream_decoder_process_until_end_of_metadatacxx . . $ FLAC__stream_decoder_process_until_end_of_metadata(d92048749c4f1284).(decoder)) |
| 1408 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR.; /*@@@ maybe needs better error code */ |
| 1409 | if(chain->statuscxx . . $ FLAC__Metadata_Chain#status. != FLAC__METADATA_CHAIN_STATUS_OKcxx . . $ FLAC__METADATA_CHAIN_STATUS_OK.) { |
| 1410 | FLAC__stream_decoder_deletecxx . . $ FLAC__stream_decoder_delete(1ffd9838c68f2516).(decoder); |
| 1411 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1412 | } |
| 1413 | |
| 1414 | FLAC__stream_decoder_deletecxx . . $ FLAC__stream_decoder_delete(1ffd9838c68f2516).(decoder); |
| 1415 | |
| 1416 | chain->last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset. = 0; /*@@@ wrong; will need to be set correctly to implement metadata writing for Ogg FLAC */ |
| 1417 | |
| 1418 | chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. = chain_calculate_length_cxx . . $ chain_calculate_length_(f01485accea8edd7).(chain); |
| 1419 | |
| 1420 | if(chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. == 0 || chain->headcxx . . $ FLAC__Metadata_Chain#head.->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. != FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.) { |
| 1421 | /* Ogg FLAC file must have at least streaminfo and vorbis comment */ |
| 1422 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_CHAIN_STATUS_BAD_METADATA.; |
| 1423 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1424 | } |
| 1425 | |
| 1426 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1427 | } |
| 1428 | |
| 1429 | static FLAC__boolcxx . . $ FLAC__bool# chain_rewrite_metadata_in_place_cb_cxx . . $ chain_rewrite_metadata_in_place_cb_(b8f3164de96cb11f).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb) |
| 1430 | { |
| 1431 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1432 | |
| 1433 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1434 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain->head); |
| 1435 | |
| 1436 | if(0 != seek_cb(handle, chain->first_offsetcxx . . $ FLAC__Metadata_Chain#first_offset., SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 1437 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR.; |
| 1438 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1439 | } |
| 1440 | |
| 1441 | for(node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; node = node->nextcxx . . $ FLAC__Metadata_Node#next.) { |
| 1442 | if(!write_metadata_block_header_cb_cxx . . $ write_metadata_block_header_cb_(71df1ec83e67c887).(handle, write_cb, node->datacxx . . $ FLAC__Metadata_Node#data.)) { |
| 1443 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR.; |
| 1444 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1445 | } |
| 1446 | if(!write_metadata_block_data_cb_cxx . . $ write_metadata_block_data_cb_(71df1ec83e67c887).(handle, write_cb, node->datacxx . . $ FLAC__Metadata_Node#data.)) { |
| 1447 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR.; |
| 1448 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1449 | } |
| 1450 | } |
| 1451 | |
| 1452 | /*FLAC__ASSERT(fflush(), ftello() == chain->last_offset);*/ |
| 1453 | |
| 1454 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_OKcxx . . $ FLAC__METADATA_CHAIN_STATUS_OK.; |
| 1455 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1456 | } |
| 1457 | |
| 1458 | static FLAC__boolcxx . . $ FLAC__bool# chain_rewrite_metadata_in_place_cxx . . $ chain_rewrite_metadata_in_place_(99b5072dba9cc464).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain) |
| 1459 | { |
| 1460 | FILEcxx . . $ FILE# *file; |
| 1461 | FLAC__boolcxx . . $ FLAC__bool# ret; |
| 1462 | |
| 1463 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain->filename); |
| 1464 | |
| 1465 | if(0 == (file = flac_fopencxx . . $ `external/flac/flac_share_compat.h:200:9`!(chain->filenamecxx . . $ FLAC__Metadata_Chain#filename., "r+b"))) { |
| 1466 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILEcxx . . $ FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE.; |
| 1467 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1468 | } |
| 1469 | |
| 1470 | /* chain_rewrite_metadata_in_place_cb_() sets chain->status for us */ |
| 1471 | ret = chain_rewrite_metadata_in_place_cb_cxx . . $ chain_rewrite_metadata_in_place_cb_(b8f3164de96cb11f).(chain, (FLAC__IOHandlecxx . . $ FLAC__IOHandle#)file, (FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write#)fwritecxx . . $ fwrite(ab0609fa07c47d6e)., fseek_wrapper_cxx . . $ fseek_wrapper_(8bc0ff128761c75d).); |
| 1472 | |
| 1473 | fclosecxx . . $ fclose(89bc1efcdac0ca22).(file); |
| 1474 | |
| 1475 | return ret; |
| 1476 | } |
| 1477 | |
| 1478 | static FLAC__boolcxx . . $ FLAC__bool# chain_rewrite_file_cxx . . $ chain_rewrite_file_(253479855c4df93e).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, const char *tempfile_path_prefix, const char *filename) |
| 1479 | { |
| 1480 | FILEcxx . . $ FILE# *f, *tempfile = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1481 | char *tempfilename = 0; |
| 1482 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# status; |
| 1483 | const FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1484 | |
| 1485 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1486 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain->filename); |
| 1487 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain->head); |
| 1488 | |
| 1489 | /* copy the file prefix (data up to first metadata block */ |
| 1490 | if(0 == (f = flac_fopencxx . . $ `external/flac/flac_share_compat.h:200:9`!(chain->filenamecxx . . $ FLAC__Metadata_Chain#filename., "rb"))) { |
| 1491 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILEcxx . . $ FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE.; |
| 1492 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1493 | } |
| 1494 | if(filename == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1495 | if(!open_tempfile_cxx . . $ open_tempfile_(542af00b782cb0a6).(chain->filenamecxx . . $ FLAC__Metadata_Chain#filename., tempfile_path_prefix, &tempfile, &tempfilename, &status)) { |
| 1496 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(status); |
| 1497 | goto err; |
| 1498 | } |
| 1499 | } |
| 1500 | else { |
| 1501 | if(0 == (tempfile = flac_fopencxx . . $ `external/flac/flac_share_compat.h:200:9`!(filename, "wb"))) { |
| 1502 | (void)fclosecxx . . $ fclose(89bc1efcdac0ca22).(f); |
| 1503 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILEcxx . . $ FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE.; |
| 1504 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1505 | } |
| 1506 | |
| 1507 | } |
| 1508 | if(!copy_n_bytes_from_file_cxx . . $ copy_n_bytes_from_file_(4aae65a1eaf6530d).(f, tempfile, chain->first_offsetcxx . . $ FLAC__Metadata_Chain#first_offset., &status)) { |
| 1509 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(status); |
| 1510 | goto err; |
| 1511 | } |
| 1512 | |
| 1513 | /* write the metadata */ |
| 1514 | for(node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; node = node->nextcxx . . $ FLAC__Metadata_Node#next.) { |
| 1515 | if(!write_metadata_block_header_cxx . . $ write_metadata_block_header_(c3cf93eace4ac78).(tempfile, &status, node->datacxx . . $ FLAC__Metadata_Node#data.)) { |
| 1516 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(status); |
| 1517 | goto err; |
| 1518 | } |
| 1519 | if(!write_metadata_block_data_cxx . . $ write_metadata_block_data_(c3cf93eace4ac78).(tempfile, &status, node->datacxx . . $ FLAC__Metadata_Node#data.)) { |
| 1520 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(status); |
| 1521 | goto err; |
| 1522 | } |
| 1523 | } |
| 1524 | /*FLAC__ASSERT(fflush(), ftello() == chain->last_offset);*/ |
| 1525 | |
| 1526 | /* copy the file postfix (everything after the metadata) */ |
| 1527 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(f, chain->last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset., SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 1528 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR.; |
| 1529 | goto err; |
| 1530 | } |
| 1531 | if(!copy_remaining_bytes_from_file_cxx . . $ copy_remaining_bytes_from_file_(2d4c80edcad7c5cd).(f, tempfile, &status)) { |
| 1532 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(status); |
| 1533 | goto err; |
| 1534 | } |
| 1535 | |
| 1536 | /* move the tempfile on top of the original */ |
| 1537 | (void)fclosecxx . . $ fclose(89bc1efcdac0ca22).(f); |
| 1538 | if(filename == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1539 | if(!transport_tempfile_cxx . . $ transport_tempfile_(73e0dab43aae5506).(chain->filenamecxx . . $ FLAC__Metadata_Chain#filename., &tempfile, &tempfilename, &status)) { |
| 1540 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(status); |
| 1541 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1542 | } |
| 1543 | } |
| 1544 | else |
| 1545 | (void)fclosecxx . . $ fclose(89bc1efcdac0ca22).(tempfile); |
| 1546 | |
| 1547 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1548 | |
| 1549 | err: |
| 1550 | (void)fclosecxx . . $ fclose(89bc1efcdac0ca22).(f); |
| 1551 | if(filename == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1552 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(&tempfile, &tempfilename); |
| 1553 | else |
| 1554 | (void)fclosecxx . . $ fclose(89bc1efcdac0ca22).(tempfile); |
| 1555 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1556 | } |
| 1557 | |
| 1558 | /* assumes 'handle' is already at beginning of file */ |
| 1559 | static FLAC__boolcxx . . $ FLAC__bool# chain_rewrite_file_cb_cxx . . $ chain_rewrite_file_cb_(b715498e9be21afc).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb, FLAC__IOCallback_Eofcxx . . $ FLAC__IOCallback_Eof# eof_cb, FLAC__IOHandlecxx . . $ FLAC__IOHandle# temp_handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# temp_write_cb) |
| 1560 | { |
| 1561 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# status; |
| 1562 | const FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1563 | |
| 1564 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1565 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 == chain->filename); |
| 1566 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain->head); |
| 1567 | |
| 1568 | /* copy the file prefix (data up to first metadata block */ |
| 1569 | if(!copy_n_bytes_from_file_cb_cxx . . $ copy_n_bytes_from_file_cb_(21a1345fa71c3da1).(handle, read_cb, temp_handle, temp_write_cb, chain->first_offsetcxx . . $ FLAC__Metadata_Chain#first_offset., &status)) { |
| 1570 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(status); |
| 1571 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1572 | } |
| 1573 | |
| 1574 | /* write the metadata */ |
| 1575 | for(node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; node = node->nextcxx . . $ FLAC__Metadata_Node#next.) { |
| 1576 | if(!write_metadata_block_header_cb_cxx . . $ write_metadata_block_header_cb_(71df1ec83e67c887).(temp_handle, temp_write_cb, node->datacxx . . $ FLAC__Metadata_Node#data.)) { |
| 1577 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR.; |
| 1578 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1579 | } |
| 1580 | if(!write_metadata_block_data_cb_cxx . . $ write_metadata_block_data_cb_(71df1ec83e67c887).(temp_handle, temp_write_cb, node->datacxx . . $ FLAC__Metadata_Node#data.)) { |
| 1581 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR.; |
| 1582 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1583 | } |
| 1584 | } |
| 1585 | /*FLAC__ASSERT(fflush(), ftello() == chain->last_offset);*/ |
| 1586 | |
| 1587 | /* copy the file postfix (everything after the metadata) */ |
| 1588 | if(0 != seek_cb(handle, chain->last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset., SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 1589 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR.; |
| 1590 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1591 | } |
| 1592 | if(!copy_remaining_bytes_from_file_cb_cxx . . $ copy_remaining_bytes_from_file_cb_(98d7a5e9975a6a84).(handle, read_cb, eof_cb, temp_handle, temp_write_cb, &status)) { |
| 1593 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(status); |
| 1594 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1595 | } |
| 1596 | |
| 1597 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1598 | } |
| 1599 | |
| 1600 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *FLAC__metadata_chain_newcxx . . $ FLAC__metadata_chain_new(3e687ddc27c637bd).(void) |
| 1601 | { |
| 1602 | FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain = calloccxx . . $ calloc(63a7bf2941bfcd7a).(1, sizeof(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain#)); |
| 1603 | |
| 1604 | if(0 != chain) |
| 1605 | chain_init_cxx . . $ chain_init_(bf4c9dce2764a4b0).(chain); |
| 1606 | |
| 1607 | return chain; |
| 1608 | } |
| 1609 | |
| 1610 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! void FLAC__metadata_chain_deletecxx . . $ FLAC__metadata_chain_delete(bf4c9dce2764a4b0).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain) |
| 1611 | { |
| 1612 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1613 | |
| 1614 | chain_clear_cxx . . $ chain_clear_(bf4c9dce2764a4b0).(chain); |
| 1615 | |
| 1616 | freecxx . . $ free(5d22bdacc48458e8).(chain); |
| 1617 | } |
| 1618 | |
| 1619 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__Metadata_ChainStatuscxx . . $ FLAC__Metadata_ChainStatus# FLAC__metadata_chain_statuscxx . . $ FLAC__metadata_chain_status(53a34a99ca15e404).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain) |
| 1620 | { |
| 1621 | FLAC__Metadata_ChainStatuscxx . . $ FLAC__Metadata_ChainStatus# status; |
| 1622 | |
| 1623 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1624 | |
| 1625 | status = chain->statuscxx . . $ FLAC__Metadata_Chain#status.; |
| 1626 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_OKcxx . . $ FLAC__METADATA_CHAIN_STATUS_OK.; |
| 1627 | return status; |
| 1628 | } |
| 1629 | |
| 1630 | static FLAC__boolcxx . . $ FLAC__bool# chain_read_cxx . . $ chain_read_(629ff816b315aa1d).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, const char *filename, FLAC__boolcxx . . $ FLAC__bool# is_ogg) |
| 1631 | { |
| 1632 | FILEcxx . . $ FILE# *file; |
| 1633 | FLAC__boolcxx . . $ FLAC__bool# ret; |
| 1634 | |
| 1635 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1636 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != filename); |
| 1637 | |
| 1638 | chain_clear_cxx . . $ chain_clear_(bf4c9dce2764a4b0).(chain); |
| 1639 | |
| 1640 | if(0 == (chain->filenamecxx . . $ FLAC__Metadata_Chain#filename. = strdupcxx . . $ strdup(a8b8e32347182212).(filename))) { |
| 1641 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 1642 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1643 | } |
| 1644 | |
| 1645 | chain->is_oggcxx . . $ FLAC__Metadata_Chain#is_ogg. = is_ogg; |
| 1646 | |
| 1647 | if(0 == (file = flac_fopencxx . . $ `external/flac/flac_share_compat.h:200:9`!(filename, "rb"))) { |
| 1648 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILEcxx . . $ FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE.; |
| 1649 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1650 | } |
| 1651 | |
| 1652 | /* the function also sets chain->status for us */ |
| 1653 | ret = is_ogg? |
| 1654 | chain_read_ogg_cb_cxx . . $ chain_read_ogg_cb_(68ff6dcec56ed976).(chain, file, (FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read#)freadcxx . . $ fread(738fc8ac1d711e58).) : |
| 1655 | chain_read_cb_cxx . . $ chain_read_cb_(9a946509894725e2).(chain, file, (FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read#)freadcxx . . $ fread(738fc8ac1d711e58)., fseek_wrapper_cxx . . $ fseek_wrapper_(8bc0ff128761c75d)., ftell_wrapper_cxx . . $ ftell_wrapper_(72c1818a5177f981).) |
| 1656 | ; |
| 1657 | |
| 1658 | fclosecxx . . $ fclose(89bc1efcdac0ca22).(file); |
| 1659 | |
| 1660 | return ret; |
| 1661 | } |
| 1662 | |
| 1663 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_chain_readcxx . . $ FLAC__metadata_chain_read(eb4261bcc9a4a6b3).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, const char *filename) |
| 1664 | { |
| 1665 | return chain_read_cxx . . $ chain_read_(629ff816b315aa1d).(chain, filename, /*is_ogg=*/falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1666 | } |
| 1667 | |
| 1668 | /*@@@@add to tests*/ |
| 1669 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_chain_read_oggcxx . . $ FLAC__metadata_chain_read_ogg(eb4261bcc9a4a6b3).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, const char *filename) |
| 1670 | { |
| 1671 | return chain_read_cxx . . $ chain_read_(629ff816b315aa1d).(chain, filename, /*is_ogg=*/truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 1672 | } |
| 1673 | |
| 1674 | static FLAC__boolcxx . . $ FLAC__bool# chain_read_with_callbacks_cxx . . $ chain_read_with_callbacks_(828d0fb2c792eb88).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallbackscxx . . $ FLAC__IOCallbacks# callbacks, FLAC__boolcxx . . $ FLAC__bool# is_ogg) |
| 1675 | { |
| 1676 | FLAC__boolcxx . . $ FLAC__bool# ret; |
| 1677 | |
| 1678 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1679 | |
| 1680 | chain_clear_cxx . . $ chain_clear_(bf4c9dce2764a4b0).(chain); |
| 1681 | |
| 1682 | if (0 == callbacks.readcxx . . $ $anonymous_type_7215e04a5e9661d5_0#read. || 0 == callbacks.seekcxx . . $ $anonymous_type_7215e04a5e9661d5_0#seek. || 0 == callbacks.tellcxx . . $ $anonymous_type_7215e04a5e9661d5_0#tell.) { |
| 1683 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKScxx . . $ FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKS.; |
| 1684 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1685 | } |
| 1686 | |
| 1687 | chain->is_oggcxx . . $ FLAC__Metadata_Chain#is_ogg. = is_ogg; |
| 1688 | |
| 1689 | /* rewind */ |
| 1690 | if(0 != callbacks.seekcxx . . $ $anonymous_type_7215e04a5e9661d5_0#seek.(handle, 0, SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 1691 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR.; |
| 1692 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1693 | } |
| 1694 | |
| 1695 | /* the function also sets chain->status for us */ |
| 1696 | ret = is_ogg? |
| 1697 | chain_read_ogg_cb_cxx . . $ chain_read_ogg_cb_(68ff6dcec56ed976).(chain, handle, callbacks.readcxx . . $ $anonymous_type_7215e04a5e9661d5_0#read.) : |
| 1698 | chain_read_cb_cxx . . $ chain_read_cb_(9a946509894725e2).(chain, handle, callbacks.readcxx . . $ $anonymous_type_7215e04a5e9661d5_0#read., callbacks.seekcxx . . $ $anonymous_type_7215e04a5e9661d5_0#seek., callbacks.tellcxx . . $ $anonymous_type_7215e04a5e9661d5_0#tell.) |
| 1699 | ; |
| 1700 | |
| 1701 | return ret; |
| 1702 | } |
| 1703 | |
| 1704 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_chain_read_with_callbackscxx . . $ FLAC__metadata_chain_read_with_callbacks(b9dd45d1ee97cbdd).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallbackscxx . . $ FLAC__IOCallbacks# callbacks) |
| 1705 | { |
| 1706 | return chain_read_with_callbacks_cxx . . $ chain_read_with_callbacks_(828d0fb2c792eb88).(chain, handle, callbacks, /*is_ogg=*/falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 1707 | } |
| 1708 | |
| 1709 | /*@@@@add to tests*/ |
| 1710 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_chain_read_ogg_with_callbackscxx . . $ FLAC__metadata_chain_read_ogg_with_callbacks(b9dd45d1ee97cbdd).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallbackscxx . . $ FLAC__IOCallbacks# callbacks) |
| 1711 | { |
| 1712 | return chain_read_with_callbacks_cxx . . $ chain_read_with_callbacks_(828d0fb2c792eb88).(chain, handle, callbacks, /*is_ogg=*/truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); |
| 1713 | } |
| 1714 | |
| 1715 | typedef enumcxx . . $ $anonymous_type_91d78abc3b3f5c98_1# { |
| 1716 | LBS_NONEcxx . . $ LBS_NONE. = 0, |
| 1717 | LBS_SIZE_CHANGEDcxx . . $ LBS_SIZE_CHANGED., |
| 1718 | LBS_BLOCK_ADDEDcxx . . $ LBS_BLOCK_ADDED., |
| 1719 | LBS_BLOCK_REMOVEDcxx . . $ LBS_BLOCK_REMOVED. |
| 1720 | } LastBlockStatecxx . . $ LastBlockState#; |
| 1721 | |
| 1722 | #if defined(_MSC_VER) |
| 1723 | // silence three MSVC warnings 'conversion from 'conversion from 'const __int64' to 'uint32_t', possible loss of data' |
| 1724 | #pragma warning ( disable : 4244 ) |
| 1725 | #endif |
| 1726 | |
| 1727 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_chain_check_if_tempfile_neededcxx . . $ FLAC__metadata_chain_check_if_tempfile_needed(ccc52723d89b1106).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__boolcxx . . $ FLAC__bool# use_padding) |
| 1728 | { |
| 1729 | /* This does all the same checks that are in chain_prepare_for_write_() |
| 1730 | * but doesn't actually alter the chain. Make sure to update the logic |
| 1731 | * here if chain_prepare_for_write_() changes. |
| 1732 | */ |
| 1733 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! current_length; |
| 1734 | LastBlockStatecxx . . $ LastBlockState# lbs_state = LBS_NONEcxx . . $ LBS_NONE.; |
| 1735 | uint32_tcxx . . $ uint32_t# lbs_size = 0; |
| 1736 | |
| 1737 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1738 | |
| 1739 | current_length = chain_calculate_length_cxx . . $ chain_calculate_length_(f01485accea8edd7).(chain); |
| 1740 | |
| 1741 | if(use_padding) { |
| 1742 | const FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# * const node = chain->tailcxx . . $ FLAC__Metadata_Chain#tail.; |
| 1743 | /* if the metadata shrank and the last block is padding, we just extend the last padding block */ |
| 1744 | if(current_length < chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. && node->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.) { |
| 1745 | lbs_state = LBS_SIZE_CHANGEDcxx . . $ LBS_SIZE_CHANGED.; |
| 1746 | lbs_size = node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. + (chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. - current_length); |
| 1747 | } |
| 1748 | /* if the metadata shrank more than 4 bytes then there's room to add another padding block */ |
| 1749 | else if(current_length + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! <= chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length.) { |
| 1750 | lbs_state = LBS_BLOCK_ADDEDcxx . . $ LBS_BLOCK_ADDED.; |
| 1751 | lbs_size = chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. - (current_length + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!); |
| 1752 | } |
| 1753 | /* if the metadata grew but the last block is padding, try cutting the padding to restore the original length so we don't have to rewrite the whole file */ |
| 1754 | else if(current_length > chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length.) { |
| 1755 | const FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! delta = current_length - chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length.; |
| 1756 | if(node->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.) { |
| 1757 | /* if the delta is exactly the size of the last padding block, remove the padding block */ |
| 1758 | if((FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! == delta) { |
| 1759 | lbs_state = LBS_BLOCK_REMOVEDcxx . . $ LBS_BLOCK_REMOVED.; |
| 1760 | lbs_size = 0; |
| 1761 | } |
| 1762 | /* if there is at least 'delta' bytes of padding, trim the padding down */ |
| 1763 | else if((FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. >= delta) { |
| 1764 | lbs_state = LBS_SIZE_CHANGEDcxx . . $ LBS_SIZE_CHANGED.; |
| 1765 | lbs_size = node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length. - delta; |
| 1766 | } |
| 1767 | } |
| 1768 | } |
| 1769 | } |
| 1770 | |
| 1771 | current_length = 0; |
| 1772 | /* check sizes of all metadata blocks; reduce padding size if necessary */ |
| 1773 | { |
| 1774 | const FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1775 | for(node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; node = node->nextcxx . . $ FLAC__Metadata_Node#next.) { |
| 1776 | uint32_tcxx . . $ uint32_t# block_len = node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length.; |
| 1777 | if(node == chain->tailcxx . . $ FLAC__Metadata_Chain#tail.) { |
| 1778 | if(lbs_state == LBS_BLOCK_REMOVEDcxx . . $ LBS_BLOCK_REMOVED.) |
| 1779 | continue; |
| 1780 | else if(lbs_state == LBS_SIZE_CHANGEDcxx . . $ LBS_SIZE_CHANGED.) |
| 1781 | block_len = lbs_size; |
| 1782 | } |
| 1783 | if(block_len >= (1u << FLAC__STREAM_METADATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_LENGTH_LEN.)) { |
| 1784 | if(node->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.) |
| 1785 | block_len = (1u << FLAC__STREAM_METADATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_LENGTH_LEN.) - 1; |
| 1786 | else |
| 1787 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`! /* the return value doesn't matter */; |
| 1788 | } |
| 1789 | current_length += (FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + block_len); |
| 1790 | } |
| 1791 | |
| 1792 | if(lbs_state == LBS_BLOCK_ADDEDcxx . . $ LBS_BLOCK_ADDED.) { |
| 1793 | /* test added padding block */ |
| 1794 | uint32_tcxx . . $ uint32_t# block_len = lbs_size; |
| 1795 | if(block_len >= (1u << FLAC__STREAM_METADATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_LENGTH_LEN.)) |
| 1796 | block_len = (1u << FLAC__STREAM_METADATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_LENGTH_LEN.) - 1; |
| 1797 | current_length += (FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + block_len); |
| 1798 | } |
| 1799 | } |
| 1800 | |
| 1801 | return (current_length != chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length.); |
| 1802 | } |
| 1803 | |
| 1804 | #if defined(_MSC_VER) |
| 1805 | #pragma warning ( default : 4244 ) |
| 1806 | #endif |
| 1807 | |
| 1808 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_chain_writecxx . . $ FLAC__metadata_chain_write(e39f4791dc046acd).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__boolcxx . . $ FLAC__bool# use_padding, FLAC__boolcxx . . $ FLAC__bool# preserve_file_stats) |
| 1809 | { |
| 1810 | struct flac_stat_scxx . . $ `external/flac/flac_share_compat.h:217:9`! stats; |
| 1811 | const char *tempfile_path_prefix = 0; |
| 1812 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! current_length; |
| 1813 | |
| 1814 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1815 | |
| 1816 | if (chain->is_oggcxx . . $ FLAC__Metadata_Chain#is_ogg.) { /* cannot write back to Ogg FLAC yet */ |
| 1817 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR.; |
| 1818 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1819 | } |
| 1820 | |
| 1821 | if (0 == chain->filenamecxx . . $ FLAC__Metadata_Chain#filename.) { |
| 1822 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCHcxx . . $ FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH.; |
| 1823 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1824 | } |
| 1825 | |
| 1826 | current_length = chain_prepare_for_write_cxx . . $ chain_prepare_for_write_(5b23599c1fbc7e91).(chain, use_padding); |
| 1827 | |
| 1828 | /* a return value of 0 means there was an error; chain->status is already set */ |
| 1829 | if (0 == current_length) |
| 1830 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1831 | |
| 1832 | if(preserve_file_stats) |
| 1833 | get_file_stats_cxx . . $ get_file_stats_(a9cd1e23e96f423c).(chain->filenamecxx . . $ FLAC__Metadata_Chain#filename., &stats); |
| 1834 | |
| 1835 | if(current_length == chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length.) { |
| 1836 | if(!chain_rewrite_metadata_in_place_cxx . . $ chain_rewrite_metadata_in_place_(99b5072dba9cc464).(chain)) |
| 1837 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1838 | } |
| 1839 | else { |
| 1840 | if(!chain_rewrite_file_cxx . . $ chain_rewrite_file_(253479855c4df93e).(chain, tempfile_path_prefix, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) |
| 1841 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1842 | |
| 1843 | /* recompute lengths and offsets */ |
| 1844 | { |
| 1845 | const FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1846 | chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. = current_length; |
| 1847 | chain->last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset. = chain->first_offsetcxx . . $ FLAC__Metadata_Chain#first_offset.; |
| 1848 | for(node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; node = node->nextcxx . . $ FLAC__Metadata_Node#next.) |
| 1849 | chain->last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset. += (FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 1850 | } |
| 1851 | } |
| 1852 | |
| 1853 | if(preserve_file_stats) |
| 1854 | set_file_stats_cxx . . $ set_file_stats_(a6d86f3aaa0bc44b).(chain->filenamecxx . . $ FLAC__Metadata_Chain#filename., &stats); |
| 1855 | |
| 1856 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1857 | } |
| 1858 | |
| 1859 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_chain_write_new_filecxx . . $ FLAC__metadata_chain_write_new_file(629ff816b315aa1d).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, const char *filename, FLAC__boolcxx . . $ FLAC__bool# use_padding) |
| 1860 | { |
| 1861 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! current_length; |
| 1862 | |
| 1863 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1864 | |
| 1865 | if (chain->is_oggcxx . . $ FLAC__Metadata_Chain#is_ogg.) { /* cannot write back to Ogg FLAC yet */ |
| 1866 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR.; |
| 1867 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1868 | } |
| 1869 | |
| 1870 | if (0 == chain->filenamecxx . . $ FLAC__Metadata_Chain#filename.) { |
| 1871 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCHcxx . . $ FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH.; |
| 1872 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1873 | } |
| 1874 | |
| 1875 | if (0 == filename) { |
| 1876 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUTcxx . . $ FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUT.; |
| 1877 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1878 | } |
| 1879 | |
| 1880 | current_length = chain_prepare_for_write_cxx . . $ chain_prepare_for_write_(5b23599c1fbc7e91).(chain, use_padding); |
| 1881 | |
| 1882 | /* a return value of 0 means there was an error; chain->status is already set */ |
| 1883 | if (0 == current_length) |
| 1884 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1885 | |
| 1886 | if(!chain_rewrite_file_cxx . . $ chain_rewrite_file_(253479855c4df93e).(chain, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, filename)) |
| 1887 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1888 | |
| 1889 | /* recompute lengths and offsets */ |
| 1890 | { |
| 1891 | const FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1892 | chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. = current_length; |
| 1893 | chain->last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset. = chain->first_offsetcxx . . $ FLAC__Metadata_Chain#first_offset.; |
| 1894 | for(node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; node = node->nextcxx . . $ FLAC__Metadata_Node#next.) |
| 1895 | chain->last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset. += (FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 1896 | } |
| 1897 | |
| 1898 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1899 | } |
| 1900 | |
| 1901 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_chain_write_with_callbackscxx . . $ FLAC__metadata_chain_write_with_callbacks(fc6bcd484f91190d).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__boolcxx . . $ FLAC__bool# use_padding, FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallbackscxx . . $ FLAC__IOCallbacks# callbacks) |
| 1902 | { |
| 1903 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! current_length; |
| 1904 | |
| 1905 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1906 | |
| 1907 | if (chain->is_oggcxx . . $ FLAC__Metadata_Chain#is_ogg.) { /* cannot write back to Ogg FLAC yet */ |
| 1908 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR.; |
| 1909 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1910 | } |
| 1911 | |
| 1912 | if (0 != chain->filenamecxx . . $ FLAC__Metadata_Chain#filename.) { |
| 1913 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCHcxx . . $ FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH.; |
| 1914 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1915 | } |
| 1916 | |
| 1917 | if (0 == callbacks.writecxx . . $ $anonymous_type_7215e04a5e9661d5_0#write. || 0 == callbacks.seekcxx . . $ $anonymous_type_7215e04a5e9661d5_0#seek.) { |
| 1918 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKScxx . . $ FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKS.; |
| 1919 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1920 | } |
| 1921 | |
| 1922 | if (FLAC__metadata_chain_check_if_tempfile_neededcxx . . $ FLAC__metadata_chain_check_if_tempfile_needed(ccc52723d89b1106).(chain, use_padding)) { |
| 1923 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALLcxx . . $ FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL.; |
| 1924 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1925 | } |
| 1926 | |
| 1927 | current_length = chain_prepare_for_write_cxx . . $ chain_prepare_for_write_(5b23599c1fbc7e91).(chain, use_padding); |
| 1928 | |
| 1929 | /* a return value of 0 means there was an error; chain->status is already set */ |
| 1930 | if (0 == current_length) |
| 1931 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1932 | |
| 1933 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(current_length == chain->initial_length); |
| 1934 | |
| 1935 | return chain_rewrite_metadata_in_place_cb_cxx . . $ chain_rewrite_metadata_in_place_cb_(b8f3164de96cb11f).(chain, handle, callbacks.writecxx . . $ $anonymous_type_7215e04a5e9661d5_0#write., callbacks.seekcxx . . $ $anonymous_type_7215e04a5e9661d5_0#seek.); |
| 1936 | } |
| 1937 | |
| 1938 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_chain_write_with_callbacks_and_tempfilecxx . . $ FLAC__metadata_chain_write_with_callbacks_and_tempfile(ff500ee5578b3c5b).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain, FLAC__boolcxx . . $ FLAC__bool# use_padding, FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallbackscxx . . $ FLAC__IOCallbacks# callbacks, FLAC__IOHandlecxx . . $ FLAC__IOHandle# temp_handle, FLAC__IOCallbackscxx . . $ FLAC__IOCallbacks# temp_callbacks) |
| 1939 | { |
| 1940 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! current_length; |
| 1941 | |
| 1942 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1943 | |
| 1944 | if (chain->is_oggcxx . . $ FLAC__Metadata_Chain#is_ogg.) { /* cannot write back to Ogg FLAC yet */ |
| 1945 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR.; |
| 1946 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1947 | } |
| 1948 | |
| 1949 | if (0 != chain->filenamecxx . . $ FLAC__Metadata_Chain#filename.) { |
| 1950 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCHcxx . . $ FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH.; |
| 1951 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1952 | } |
| 1953 | |
| 1954 | if (0 == callbacks.readcxx . . $ $anonymous_type_7215e04a5e9661d5_0#read. || 0 == callbacks.seekcxx . . $ $anonymous_type_7215e04a5e9661d5_0#seek. || 0 == callbacks.eofcxx . . $ $anonymous_type_7215e04a5e9661d5_0#eof.) { |
| 1955 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKScxx . . $ FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKS.; |
| 1956 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1957 | } |
| 1958 | if (0 == temp_callbacks.writecxx . . $ $anonymous_type_7215e04a5e9661d5_0#write.) { |
| 1959 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKScxx . . $ FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKS.; |
| 1960 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1961 | } |
| 1962 | |
| 1963 | current_length = chain_prepare_for_write_cxx . . $ chain_prepare_for_write_(5b23599c1fbc7e91).(chain, use_padding); |
| 1964 | |
| 1965 | /* a return value of 0 means there was an error; chain->status is already set */ |
| 1966 | if (0 == current_length) |
| 1967 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1968 | |
| 1969 | /* rewind */ |
| 1970 | if(0 != callbacks.seekcxx . . $ $anonymous_type_7215e04a5e9661d5_0#seek.(handle, 0, SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 1971 | chain->statuscxx . . $ FLAC__Metadata_Chain#status. = FLAC__METADATA_CHAIN_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR.; |
| 1972 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1973 | } |
| 1974 | |
| 1975 | if(!chain_rewrite_file_cb_cxx . . $ chain_rewrite_file_cb_(b715498e9be21afc).(chain, handle, callbacks.readcxx . . $ $anonymous_type_7215e04a5e9661d5_0#read., callbacks.seekcxx . . $ $anonymous_type_7215e04a5e9661d5_0#seek., callbacks.eofcxx . . $ $anonymous_type_7215e04a5e9661d5_0#eof., temp_handle, temp_callbacks.writecxx . . $ $anonymous_type_7215e04a5e9661d5_0#write.)) |
| 1976 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 1977 | |
| 1978 | /* recompute lengths and offsets */ |
| 1979 | { |
| 1980 | const FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1981 | chain->initial_lengthcxx . . $ FLAC__Metadata_Chain#initial_length. = current_length; |
| 1982 | chain->last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset. = chain->first_offsetcxx . . $ FLAC__Metadata_Chain#first_offset.; |
| 1983 | for(node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; node = node->nextcxx . . $ FLAC__Metadata_Node#next.) |
| 1984 | chain->last_offsetcxx . . $ FLAC__Metadata_Chain#last_offset. += (FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + node->datacxx . . $ FLAC__Metadata_Node#data.->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 1985 | } |
| 1986 | |
| 1987 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1988 | } |
| 1989 | |
| 1990 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! void FLAC__metadata_chain_merge_paddingcxx . . $ FLAC__metadata_chain_merge_padding(bf4c9dce2764a4b0).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain) |
| 1991 | { |
| 1992 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 1993 | |
| 1994 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 1995 | |
| 1996 | for(node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; node; ) { |
| 1997 | if(!chain_merge_adjacent_padding_cxx . . $ chain_merge_adjacent_padding_(9fef7d02ce26e7fa).(chain, node)) |
| 1998 | node = node->nextcxx . . $ FLAC__Metadata_Node#next.; |
| 1999 | } |
| 2000 | } |
| 2001 | |
| 2002 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! void FLAC__metadata_chain_sort_paddingcxx . . $ FLAC__metadata_chain_sort_padding(bf4c9dce2764a4b0).(FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain) |
| 2003 | { |
| 2004 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node, *save; |
| 2005 | uint32_tcxx . . $ uint32_t# i; |
| 2006 | |
| 2007 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 2008 | |
| 2009 | /* |
| 2010 | * Don't try and be too smart... this simple algo is good enough for |
| 2011 | * the small number of nodes that we deal with. |
| 2012 | */ |
| 2013 | for(i = 0, node = chain->headcxx . . $ FLAC__Metadata_Chain#head.; i < chain->nodescxx . . $ FLAC__Metadata_Chain#nodes.; i++) { |
| 2014 | if(node->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.) { |
| 2015 | save = node->nextcxx . . $ FLAC__Metadata_Node#next.; |
| 2016 | chain_remove_node_cxx . . $ chain_remove_node_(9e55dd69b0dd5d98).(chain, node); |
| 2017 | chain_append_node_cxx . . $ chain_append_node_(9e55dd69b0dd5d98).(chain, node); |
| 2018 | node = save; |
| 2019 | } |
| 2020 | else { |
| 2021 | node = node->nextcxx . . $ FLAC__Metadata_Node#next.; |
| 2022 | } |
| 2023 | } |
| 2024 | |
| 2025 | FLAC__metadata_chain_merge_paddingcxx . . $ FLAC__metadata_chain_merge_padding(bf4c9dce2764a4b0).(chain); |
| 2026 | } |
| 2027 | |
| 2028 | |
| 2029 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *FLAC__metadata_iterator_newcxx . . $ FLAC__metadata_iterator_new(dc726c635504f3d2).(void) |
| 2030 | { |
| 2031 | FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator = calloccxx . . $ calloc(63a7bf2941bfcd7a).(1, sizeof(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator#)); |
| 2032 | |
| 2033 | /* calloc() implies: |
| 2034 | iterator->current = 0; |
| 2035 | iterator->chain = 0; |
| 2036 | */ |
| 2037 | |
| 2038 | return iterator; |
| 2039 | } |
| 2040 | |
| 2041 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! void FLAC__metadata_iterator_deletecxx . . $ FLAC__metadata_iterator_delete(eea4cde3fdcef24b).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator) |
| 2042 | { |
| 2043 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2044 | |
| 2045 | freecxx . . $ free(5d22bdacc48458e8).(iterator); |
| 2046 | } |
| 2047 | |
| 2048 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! void FLAC__metadata_iterator_initcxx . . $ FLAC__metadata_iterator_init(d729b50fd8f491c8).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator, FLAC__Metadata_Chaincxx . . $ FLAC__Metadata_Chain# *chain) |
| 2049 | { |
| 2050 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2051 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain); |
| 2052 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != chain->head); |
| 2053 | |
| 2054 | iterator->chaincxx . . $ FLAC__Metadata_Iterator#chain. = chain; |
| 2055 | iterator->currentcxx . . $ FLAC__Metadata_Iterator#current. = chain->headcxx . . $ FLAC__Metadata_Chain#head.; |
| 2056 | } |
| 2057 | |
| 2058 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_iterator_nextcxx . . $ FLAC__metadata_iterator_next(6f0e4ef60c1416a8).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator) |
| 2059 | { |
| 2060 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2061 | |
| 2062 | if(0 == iterator->currentcxx . . $ FLAC__Metadata_Iterator#current. || 0 == iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->nextcxx . . $ FLAC__Metadata_Node#next.) |
| 2063 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2064 | |
| 2065 | iterator->currentcxx . . $ FLAC__Metadata_Iterator#current. = iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->nextcxx . . $ FLAC__Metadata_Node#next.; |
| 2066 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2067 | } |
| 2068 | |
| 2069 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_iterator_prevcxx . . $ FLAC__metadata_iterator_prev(6f0e4ef60c1416a8).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator) |
| 2070 | { |
| 2071 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2072 | |
| 2073 | if(0 == iterator->currentcxx . . $ FLAC__Metadata_Iterator#current. || 0 == iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->prevcxx . . $ FLAC__Metadata_Node#prev.) |
| 2074 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2075 | |
| 2076 | iterator->currentcxx . . $ FLAC__Metadata_Iterator#current. = iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->prevcxx . . $ FLAC__Metadata_Node#prev.; |
| 2077 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2078 | } |
| 2079 | |
| 2080 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__MetadataTypecxx . . $ FLAC__MetadataType# FLAC__metadata_iterator_get_block_typecxx . . $ FLAC__metadata_iterator_get_block_type(81399ab81f9e2c79).(const FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator) |
| 2081 | { |
| 2082 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2083 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->current); |
| 2084 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->current->data); |
| 2085 | |
| 2086 | return iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type.; |
| 2087 | } |
| 2088 | |
| 2089 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *FLAC__metadata_iterator_get_blockcxx . . $ FLAC__metadata_iterator_get_block(42fa0f6defde8299).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator) |
| 2090 | { |
| 2091 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2092 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->current); |
| 2093 | |
| 2094 | return iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->datacxx . . $ FLAC__Metadata_Node#data.; |
| 2095 | } |
| 2096 | |
| 2097 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_iterator_set_blockcxx . . $ FLAC__metadata_iterator_set_block(93e5d36f46947eb6).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block) |
| 2098 | { |
| 2099 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2100 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != block); |
| 2101 | return FLAC__metadata_iterator_delete_blockcxx . . $ FLAC__metadata_iterator_delete_block(b7780745a65eb615).(iterator, falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!) && FLAC__metadata_iterator_insert_block_aftercxx . . $ FLAC__metadata_iterator_insert_block_after(93e5d36f46947eb6).(iterator, block); |
| 2102 | } |
| 2103 | |
| 2104 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_iterator_delete_blockcxx . . $ FLAC__metadata_iterator_delete_block(b7780745a65eb615).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator, FLAC__boolcxx . . $ FLAC__bool# replace_with_padding) |
| 2105 | { |
| 2106 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *save; |
| 2107 | |
| 2108 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2109 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->current); |
| 2110 | |
| 2111 | if(0 == iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->prevcxx . . $ FLAC__Metadata_Node#prev.) { |
| 2112 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->current->data->type == FLAC__METADATA_TYPE_STREAMINFO); |
| 2113 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2114 | } |
| 2115 | |
| 2116 | save = iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->prevcxx . . $ FLAC__Metadata_Node#prev.; |
| 2117 | |
| 2118 | if(replace_with_padding) { |
| 2119 | FLAC__metadata_object_delete_datacxx . . $ FLAC__metadata_object_delete_data(584ecc423fe01cfd).(iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->datacxx . . $ FLAC__Metadata_Node#data.); |
| 2120 | iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->datacxx . . $ FLAC__Metadata_Node#data.->typecxx . . $ FLAC__StreamMetadata#type. = FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.; |
| 2121 | } |
| 2122 | else { |
| 2123 | chain_delete_node_cxx . . $ chain_delete_node_(9e55dd69b0dd5d98).(iterator->chaincxx . . $ FLAC__Metadata_Iterator#chain., iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.); |
| 2124 | } |
| 2125 | |
| 2126 | iterator->currentcxx . . $ FLAC__Metadata_Iterator#current. = save; |
| 2127 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2128 | } |
| 2129 | |
| 2130 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_iterator_insert_block_beforecxx . . $ FLAC__metadata_iterator_insert_block_before(93e5d36f46947eb6).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block) |
| 2131 | { |
| 2132 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 2133 | |
| 2134 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2135 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->current); |
| 2136 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != block); |
| 2137 | |
| 2138 | if(block->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.) |
| 2139 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2140 | |
| 2141 | if(0 == iterator->currentcxx . . $ FLAC__Metadata_Iterator#current.->prevcxx . . $ FLAC__Metadata_Node#prev.) { |
| 2142 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->current->data->type == FLAC__METADATA_TYPE_STREAMINFO); |
| 2143 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2144 | } |
| 2145 | |
| 2146 | if(0 == (node = node_new_cxx . . $ node_new_(6adf7f5d56df1c30).())) |
| 2147 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2148 | |
| 2149 | node->datacxx . . $ FLAC__Metadata_Node#data. = block; |
| 2150 | iterator_insert_node_cxx . . $ iterator_insert_node_(c0bd230a153a627).(iterator, node); |
| 2151 | iterator->currentcxx . . $ FLAC__Metadata_Iterator#current. = node; |
| 2152 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2153 | } |
| 2154 | |
| 2155 | FLAC_APIcxx . . $ `external/flac/flac_FLAC_export.h:91:9`! FLAC__boolcxx . . $ FLAC__bool# FLAC__metadata_iterator_insert_block_aftercxx . . $ FLAC__metadata_iterator_insert_block_after(93e5d36f46947eb6).(FLAC__Metadata_Iteratorcxx . . $ FLAC__Metadata_Iterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block) |
| 2156 | { |
| 2157 | FLAC__Metadata_Nodecxx . . $ FLAC__Metadata_Node# *node; |
| 2158 | |
| 2159 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2160 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->current); |
| 2161 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != block); |
| 2162 | |
| 2163 | if(block->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.) |
| 2164 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2165 | |
| 2166 | if(0 == (node = node_new_cxx . . $ node_new_(6adf7f5d56df1c30).())) |
| 2167 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2168 | |
| 2169 | node->datacxx . . $ FLAC__Metadata_Node#data. = block; |
| 2170 | iterator_insert_node_after_cxx . . $ iterator_insert_node_after_(c0bd230a153a627).(iterator, node); |
| 2171 | iterator->currentcxx . . $ FLAC__Metadata_Iterator#current. = node; |
| 2172 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2173 | } |
| 2174 | |
| 2175 | |
| 2176 | /**************************************************************************** |
| 2177 | * |
| 2178 | * Local function definitions |
| 2179 | * |
| 2180 | ***************************************************************************/ |
| 2181 | |
| 2182 | void pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(FLAC__uint32cxx . . $ FLAC__uint32# val, FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes) |
| 2183 | { |
| 2184 | uint32_tcxx . . $ uint32_t# i; |
| 2185 | |
| 2186 | b += bytes; |
| 2187 | |
| 2188 | for(i = 0; i < bytes; i++) { |
| 2189 | *(--b) = (FLAC__bytecxx . . $ FLAC__byte#)(val & 0xff); |
| 2190 | val >>= 8; |
| 2191 | } |
| 2192 | } |
| 2193 | |
| 2194 | void pack_uint32_little_endian_cxx . . $ pack_uint32_little_endian_(948b2170e76063bc).(FLAC__uint32cxx . . $ FLAC__uint32# val, FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes) |
| 2195 | { |
| 2196 | uint32_tcxx . . $ uint32_t# i; |
| 2197 | |
| 2198 | for(i = 0; i < bytes; i++) { |
| 2199 | *(b++) = (FLAC__bytecxx . . $ FLAC__byte#)(val & 0xff); |
| 2200 | val >>= 8; |
| 2201 | } |
| 2202 | } |
| 2203 | |
| 2204 | void pack_uint64_cxx . . $ pack_uint64_(1f08f972bc7cbafe).(FLAC__uint64cxx . . $ FLAC__uint64# val, FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes) |
| 2205 | { |
| 2206 | uint32_tcxx . . $ uint32_t# i; |
| 2207 | |
| 2208 | b += bytes; |
| 2209 | |
| 2210 | for(i = 0; i < bytes; i++) { |
| 2211 | *(--b) = (FLAC__bytecxx . . $ FLAC__byte#)(val & 0xff); |
| 2212 | val >>= 8; |
| 2213 | } |
| 2214 | } |
| 2215 | |
| 2216 | FLAC__uint32cxx . . $ FLAC__uint32# unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes) |
| 2217 | { |
| 2218 | FLAC__uint32cxx . . $ FLAC__uint32# ret = 0; |
| 2219 | uint32_tcxx . . $ uint32_t# i; |
| 2220 | |
| 2221 | for(i = 0; i < bytes; i++) |
| 2222 | ret = (ret << 8) | (FLAC__uint32cxx . . $ FLAC__uint32#)(*b++); |
| 2223 | |
| 2224 | return ret; |
| 2225 | } |
| 2226 | |
| 2227 | FLAC__uint32cxx . . $ FLAC__uint32# unpack_uint32_little_endian_cxx . . $ unpack_uint32_little_endian_(1d7cbbd5718e4a4f).(FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes) |
| 2228 | { |
| 2229 | FLAC__uint32cxx . . $ FLAC__uint32# ret = 0; |
| 2230 | uint32_tcxx . . $ uint32_t# i; |
| 2231 | |
| 2232 | b += bytes; |
| 2233 | |
| 2234 | for(i = 0; i < bytes; i++) |
| 2235 | ret = (ret << 8) | (FLAC__uint32cxx . . $ FLAC__uint32#)(*--b); |
| 2236 | |
| 2237 | return ret; |
| 2238 | } |
| 2239 | |
| 2240 | FLAC__uint64cxx . . $ FLAC__uint64# unpack_uint64_cxx . . $ unpack_uint64_(f323263d662f9058).(FLAC__bytecxx . . $ FLAC__byte# *b, uint32_tcxx . . $ uint32_t# bytes) |
| 2241 | { |
| 2242 | FLAC__uint64cxx . . $ FLAC__uint64# ret = 0; |
| 2243 | uint32_tcxx . . $ uint32_t# i; |
| 2244 | |
| 2245 | for(i = 0; i < bytes; i++) |
| 2246 | ret = (ret << 8) | (FLAC__uint64cxx . . $ FLAC__uint64#)(*b++); |
| 2247 | |
| 2248 | return ret; |
| 2249 | } |
| 2250 | |
| 2251 | FLAC__boolcxx . . $ FLAC__bool# read_metadata_block_header_cxx . . $ read_metadata_block_header_(2e72b239d5ede54f).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 2252 | { |
| 2253 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2254 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 2255 | |
| 2256 | if(!read_metadata_block_header_cb_cxx . . $ read_metadata_block_header_cb_(5c638d57e53399a4).((FLAC__IOHandlecxx . . $ FLAC__IOHandle#)iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., (FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read#)freadcxx . . $ fread(738fc8ac1d711e58)., &iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last., &iterator->typecxx . . $ FLAC__Metadata_SimpleIterator#type., &iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length.)) { |
| 2257 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2258 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2259 | } |
| 2260 | |
| 2261 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2262 | } |
| 2263 | |
| 2264 | FLAC__boolcxx . . $ FLAC__bool# read_metadata_block_data_cxx . . $ read_metadata_block_data_(24e551a2ffc6da2b).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block) |
| 2265 | { |
| 2266 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator); |
| 2267 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != iterator->file); |
| 2268 | |
| 2269 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = read_metadata_block_data_cb_cxx . . $ read_metadata_block_data_cb_(4233a43fc2cc3a52).((FLAC__IOHandlecxx . . $ FLAC__IOHandle#)iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., (FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read#)freadcxx . . $ fread(738fc8ac1d711e58)., fseek_wrapper_cxx . . $ fseek_wrapper_(8bc0ff128761c75d)., block); |
| 2270 | |
| 2271 | return (iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.); |
| 2272 | } |
| 2273 | |
| 2274 | FLAC__boolcxx . . $ FLAC__bool# read_metadata_block_header_cb_cxx . . $ read_metadata_block_header_cb_(5c638d57e53399a4).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__boolcxx . . $ FLAC__bool# *is_last, FLAC__MetadataTypecxx . . $ FLAC__MetadataType# *type, uint32_tcxx . . $ uint32_t# *length) |
| 2275 | { |
| 2276 | FLAC__bytecxx . . $ FLAC__byte# raw_header[FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!]; |
| 2277 | |
| 2278 | if(read_cb(raw_header, 1, FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!, handle) != FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!) |
| 2279 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2280 | |
| 2281 | *is_last = raw_header[0] & 0x80? truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`! : falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2282 | *type = (FLAC__MetadataTypecxx . . $ FLAC__MetadataType#)(raw_header[0] & 0x7f); |
| 2283 | *length = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(raw_header + 1, 3); |
| 2284 | |
| 2285 | /* Note that we don't check: |
| 2286 | * if(iterator->type >= FLAC__METADATA_TYPE_UNDEFINED) |
| 2287 | * we just will read in an opaque block |
| 2288 | */ |
| 2289 | |
| 2290 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2291 | } |
| 2292 | |
| 2293 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_cb_cxx . . $ read_metadata_block_data_cb_(4233a43fc2cc3a52).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block) |
| 2294 | { |
| 2295 | switch(block->typecxx . . $ FLAC__StreamMetadata#type.) { |
| 2296 | case FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.: |
| 2297 | return read_metadata_block_data_streaminfo_cb_cxx . . $ read_metadata_block_data_streaminfo_cb_(584ad77fb9585242).(handle, read_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info.); |
| 2298 | case FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.: |
| 2299 | return read_metadata_block_data_padding_cb_cxx . . $ read_metadata_block_data_padding_cb_(1a02766a644191df).(handle, seek_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..paddingcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#padding., block->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 2300 | case FLAC__METADATA_TYPE_APPLICATIONcxx . . $ FLAC__METADATA_TYPE_APPLICATION.: |
| 2301 | return read_metadata_block_data_application_cb_cxx . . $ read_metadata_block_data_application_cb_(25c32ebb5585407c).(handle, read_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..applicationcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#application., block->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 2302 | case FLAC__METADATA_TYPE_SEEKTABLEcxx . . $ FLAC__METADATA_TYPE_SEEKTABLE.: |
| 2303 | return read_metadata_block_data_seektable_cb_cxx . . $ read_metadata_block_data_seektable_cb_(5b7e9a8f69191e54).(handle, read_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..seek_tablecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#seek_table., block->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 2304 | case FLAC__METADATA_TYPE_VORBIS_COMMENTcxx . . $ FLAC__METADATA_TYPE_VORBIS_COMMENT.: |
| 2305 | return read_metadata_block_data_vorbis_comment_cb_cxx . . $ read_metadata_block_data_vorbis_comment_cb_(ba52f2232469b28c).(handle, read_cb, seek_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment., block->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 2306 | case FLAC__METADATA_TYPE_CUESHEETcxx . . $ FLAC__METADATA_TYPE_CUESHEET.: |
| 2307 | return read_metadata_block_data_cuesheet_cb_cxx . . $ read_metadata_block_data_cuesheet_cb_(fe39bb7bcc8e812a).(handle, read_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..cue_sheetcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#cue_sheet.); |
| 2308 | case FLAC__METADATA_TYPE_PICTUREcxx . . $ FLAC__METADATA_TYPE_PICTURE.: |
| 2309 | return read_metadata_block_data_picture_cb_cxx . . $ read_metadata_block_data_picture_cb_(e5d5f6ea060a84ed).(handle, read_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture.); |
| 2310 | default: |
| 2311 | return read_metadata_block_data_unknown_cb_cxx . . $ read_metadata_block_data_unknown_cb_(96443185be7acd7b).(handle, read_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..unknowncxx . . $ FLAC__StreamMetadata#$anonymous_type_34#unknown., block->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 2312 | } |
| 2313 | } |
| 2314 | |
| 2315 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_streaminfo_cb_cxx . . $ read_metadata_block_data_streaminfo_cb_(584ad77fb9585242).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_StreamInfocxx . . $ FLAC__StreamMetadata_StreamInfo# *block) |
| 2316 | { |
| 2317 | FLAC__bytecxx . . $ FLAC__byte# buffer[FLAC__STREAM_METADATA_STREAMINFO_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:557:9`!], *b; |
| 2318 | |
| 2319 | if(read_cb(buffer, 1, FLAC__STREAM_METADATA_STREAMINFO_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:557:9`!, handle) != FLAC__STREAM_METADATA_STREAMINFO_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:557:9`!) |
| 2320 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2321 | |
| 2322 | b = buffer; |
| 2323 | |
| 2324 | /* we are using hardcoded numbers for simplicity but we should |
| 2325 | * probably eventually write a bit-level unpacker and use the |
| 2326 | * _STREAMINFO_ constants. |
| 2327 | */ |
| 2328 | block->min_blocksizecxx . . $ $anonymous_type_81a4853959168ec7_21#min_blocksize. = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(b, 2); b += 2; |
| 2329 | block->max_blocksizecxx . . $ $anonymous_type_81a4853959168ec7_21#max_blocksize. = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(b, 2); b += 2; |
| 2330 | block->min_framesizecxx . . $ $anonymous_type_81a4853959168ec7_21#min_framesize. = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(b, 3); b += 3; |
| 2331 | block->max_framesizecxx . . $ $anonymous_type_81a4853959168ec7_21#max_framesize. = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(b, 3); b += 3; |
| 2332 | block->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_21#sample_rate. = (unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(b, 2) << 4) | ((uint32_tcxx . . $ uint32_t#)(b[2] & 0xf0) >> 4); |
| 2333 | block->channelscxx . . $ $anonymous_type_81a4853959168ec7_21#channels. = (uint32_tcxx . . $ uint32_t#)((b[2] & 0x0e) >> 1) + 1; |
| 2334 | block->bits_per_samplecxx . . $ $anonymous_type_81a4853959168ec7_21#bits_per_sample. = ((((uint32_tcxx . . $ uint32_t#)(b[2] & 0x01)) << 4) | (((uint32_tcxx . . $ uint32_t#)(b[3] & 0xf0)) >> 4)) + 1; |
| 2335 | block->total_samplescxx . . $ $anonymous_type_81a4853959168ec7_21#total_samples. = (((FLAC__uint64cxx . . $ FLAC__uint64#)(b[3] & 0x0f)) << 32) | unpack_uint64_cxx . . $ unpack_uint64_(f323263d662f9058).(b+4, 4); |
| 2336 | memcpycxx . . $ memcpy(cc817cb175f282d).(block->md5sumcxx . . $ $anonymous_type_81a4853959168ec7_21#md5sum., b+8, 16); |
| 2337 | |
| 2338 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2339 | } |
| 2340 | |
| 2341 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_padding_cb_cxx . . $ read_metadata_block_data_padding_cb_(1a02766a644191df).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb, FLAC__StreamMetadata_Paddingcxx . . $ FLAC__StreamMetadata_Padding# *block, uint32_tcxx . . $ uint32_t# block_length) |
| 2342 | { |
| 2343 | (void)block; /* nothing to do; we don't care about reading the padding bytes */ |
| 2344 | |
| 2345 | if(0 != seek_cb(handle, block_length, SEEK_CURcxx . . $ `<external>/14710646456994434043/fcntl.h:138:10`!)) |
| 2346 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 2347 | |
| 2348 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2349 | } |
| 2350 | |
| 2351 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_application_cb_cxx . . $ read_metadata_block_data_application_cb_(25c32ebb5585407c).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_Applicationcxx . . $ FLAC__StreamMetadata_Application# *block, uint32_tcxx . . $ uint32_t# block_length) |
| 2352 | { |
| 2353 | const uint32_tcxx . . $ uint32_t# id_bytes = FLAC__STREAM_METADATA_APPLICATION_ID_LENcxx . . $ FLAC__STREAM_METADATA_APPLICATION_ID_LEN. / 8; |
| 2354 | |
| 2355 | if(read_cb(block->idcxx . . $ $anonymous_type_81a4853959168ec7_23#id., 1, id_bytes, handle) != id_bytes) |
| 2356 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2357 | |
| 2358 | if(block_length < id_bytes) |
| 2359 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2360 | |
| 2361 | block_length -= id_bytes; |
| 2362 | |
| 2363 | if(block_length == 0) { |
| 2364 | block->datacxx . . $ $anonymous_type_81a4853959168ec7_23#data. = 0; |
| 2365 | } |
| 2366 | else { |
| 2367 | if(0 == (block->datacxx . . $ $anonymous_type_81a4853959168ec7_23#data. = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(block_length))) |
| 2368 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 2369 | |
| 2370 | if(read_cb(block->datacxx . . $ $anonymous_type_81a4853959168ec7_23#data., 1, block_length, handle) != block_length) |
| 2371 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2372 | } |
| 2373 | |
| 2374 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2375 | } |
| 2376 | |
| 2377 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_seektable_cb_cxx . . $ read_metadata_block_data_seektable_cb_(5b7e9a8f69191e54).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_SeekTablecxx . . $ FLAC__StreamMetadata_SeekTable# *block, uint32_tcxx . . $ uint32_t# block_length) |
| 2378 | { |
| 2379 | uint32_tcxx . . $ uint32_t# i; |
| 2380 | FLAC__bytecxx . . $ FLAC__byte# buffer[FLAC__STREAM_METADATA_SEEKPOINT_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:598:9`!]; |
| 2381 | |
| 2382 | if(block_length % FLAC__STREAM_METADATA_SEEKPOINT_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:598:9`! != 0) |
| 2383 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA.; |
| 2384 | |
| 2385 | block->num_pointscxx . . $ $anonymous_type_81a4853959168ec7_25#num_points. = block_length / FLAC__STREAM_METADATA_SEEKPOINT_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:598:9`!; |
| 2386 | |
| 2387 | if(block->num_pointscxx . . $ $anonymous_type_81a4853959168ec7_25#num_points. == 0) |
| 2388 | block->pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points. = 0; |
| 2389 | else if(0 == (block->pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points. = safe_malloc_mul_2op_pcxx . . $ safe_malloc_mul_2op_p(63a7bf2941bfcd7a).(block->num_pointscxx . . $ $anonymous_type_81a4853959168ec7_25#num_points., /*times*/sizeof(FLAC__StreamMetadata_SeekPointcxx . . $ FLAC__StreamMetadata_SeekPoint#)))) |
| 2390 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 2391 | |
| 2392 | for(i = 0; i < block->num_pointscxx . . $ $anonymous_type_81a4853959168ec7_25#num_points.; i++) { |
| 2393 | if(read_cb(buffer, 1, FLAC__STREAM_METADATA_SEEKPOINT_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:598:9`!, handle) != FLAC__STREAM_METADATA_SEEKPOINT_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:598:9`!) |
| 2394 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2395 | /* some MAGIC NUMBERs here */ |
| 2396 | block->pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points.[i].sample_numbercxx . . $ $anonymous_type_81a4853959168ec7_24#sample_number. = unpack_uint64_cxx . . $ unpack_uint64_(f323263d662f9058).(buffer, 8); |
| 2397 | block->pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points.[i].stream_offsetcxx . . $ $anonymous_type_81a4853959168ec7_24#stream_offset. = unpack_uint64_cxx . . $ unpack_uint64_(f323263d662f9058).(buffer+8, 8); |
| 2398 | block->pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points.[i].frame_samplescxx . . $ $anonymous_type_81a4853959168ec7_24#frame_samples. = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer+16, 2); |
| 2399 | } |
| 2400 | |
| 2401 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2402 | } |
| 2403 | |
| 2404 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_vorbis_comment_entry_cb_cxx . . $ read_metadata_block_data_vorbis_comment_entry_cb_(53bf8e2328cbf52a).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_VorbisComment_Entrycxx . . $ FLAC__StreamMetadata_VorbisComment_Entry# *entry, uint32_tcxx . . $ uint32_t# max_length) |
| 2405 | { |
| 2406 | const uint32_tcxx . . $ uint32_t# entry_length_len = FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN. / 8; |
| 2407 | FLAC__bytecxx . . $ FLAC__byte# buffer[4]; /* magic number is asserted below */ |
| 2408 | |
| 2409 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN / 8 == sizeof(buffer)); |
| 2410 | |
| 2411 | if(max_length < entry_length_len) |
| 2412 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA.; |
| 2413 | |
| 2414 | max_length -= entry_length_len; |
| 2415 | if(read_cb(buffer, 1, entry_length_len, handle) != entry_length_len) |
| 2416 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2417 | entry->lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length. = unpack_uint32_little_endian_cxx . . $ unpack_uint32_little_endian_(1d7cbbd5718e4a4f).(buffer, entry_length_len); |
| 2418 | if(max_length < entry->lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.) { |
| 2419 | entry->lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length. = 0; |
| 2420 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA.; |
| 2421 | } |
| 2422 | |
| 2423 | if(0 != entry->entrycxx . . $ $anonymous_type_81a4853959168ec7_26#entry.) |
| 2424 | freecxx . . $ free(5d22bdacc48458e8).(entry->entrycxx . . $ $anonymous_type_81a4853959168ec7_26#entry.); |
| 2425 | |
| 2426 | if(0 == (entry->entrycxx . . $ $anonymous_type_81a4853959168ec7_26#entry. = safe_malloc_add_2op_cxx . . $ safe_malloc_add_2op_(63a7bf2941bfcd7a).(entry->lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length., /*+*/1))) |
| 2427 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 2428 | |
| 2429 | if(entry->lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length. > 0 && read_cb(entry->entrycxx . . $ $anonymous_type_81a4853959168ec7_26#entry., 1, entry->lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length., handle) != entry->lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.) |
| 2430 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2431 | |
| 2432 | entry->entrycxx . . $ $anonymous_type_81a4853959168ec7_26#entry.[entry->lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.] = '\0'; |
| 2433 | |
| 2434 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2435 | } |
| 2436 | |
| 2437 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_vorbis_comment_cb_cxx . . $ read_metadata_block_data_vorbis_comment_cb_(ba52f2232469b28c).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb, FLAC__StreamMetadata_VorbisCommentcxx . . $ FLAC__StreamMetadata_VorbisComment# *block, uint32_tcxx . . $ uint32_t# block_length) |
| 2438 | { |
| 2439 | uint32_tcxx . . $ uint32_t# i; |
| 2440 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# status; |
| 2441 | const uint32_tcxx . . $ uint32_t# num_comments_len = FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LENcxx . . $ FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN. / 8; |
| 2442 | FLAC__bytecxx . . $ FLAC__byte# buffer[4]; /* magic number is asserted below */ |
| 2443 | |
| 2444 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN / 8 == sizeof(buffer)); |
| 2445 | |
| 2446 | status = read_metadata_block_data_vorbis_comment_entry_cb_cxx . . $ read_metadata_block_data_vorbis_comment_entry_cb_(53bf8e2328cbf52a).(handle, read_cb, &(block->vendor_stringcxx . . $ $anonymous_type_81a4853959168ec7_27#vendor_string.), block_length); |
| 2447 | if(block_length >= 4) |
| 2448 | block_length -= 4; |
| 2449 | if(status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA.) |
| 2450 | goto skip; |
| 2451 | else if(status != FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.) |
| 2452 | return status; |
| 2453 | block_length -= block->vendor_stringcxx . . $ $anonymous_type_81a4853959168ec7_27#vendor_string..lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.; |
| 2454 | |
| 2455 | if(block_length < num_comments_len) goto skip; else block_length -= num_comments_len; |
| 2456 | if(read_cb(buffer, 1, num_comments_len, handle) != num_comments_len) |
| 2457 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2458 | block->num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments. = unpack_uint32_little_endian_cxx . . $ unpack_uint32_little_endian_(1d7cbbd5718e4a4f).(buffer, num_comments_len); |
| 2459 | |
| 2460 | if(block->num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments. == 0) { |
| 2461 | block->commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments. = 0; |
| 2462 | } |
| 2463 | else if(block->num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments. > (block_length >> 2)) { /* each comment needs at least 4 byte */ |
| 2464 | block->num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments. = 0; |
| 2465 | status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA.; |
| 2466 | goto skip; |
| 2467 | } |
| 2468 | else if(0 == (block->commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments. = calloccxx . . $ calloc(63a7bf2941bfcd7a).(block->num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments., sizeof(FLAC__StreamMetadata_VorbisComment_Entrycxx . . $ FLAC__StreamMetadata_VorbisComment_Entry#)))) { |
| 2469 | block->num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments. = 0; |
| 2470 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 2471 | } |
| 2472 | |
| 2473 | for(i = 0; i < block->num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments.; i++) { |
| 2474 | status = read_metadata_block_data_vorbis_comment_entry_cb_cxx . . $ read_metadata_block_data_vorbis_comment_entry_cb_(53bf8e2328cbf52a).(handle, read_cb, block->commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments. + i, block_length); |
| 2475 | if(block_length >= 4) block_length -= 4; |
| 2476 | if(status == FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA.) { |
| 2477 | block->num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments. = i; |
| 2478 | goto skip; |
| 2479 | } |
| 2480 | else if(status != FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.) return status; |
| 2481 | block_length -= block->commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments.[i].lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.; |
| 2482 | } |
| 2483 | |
| 2484 | skip: |
| 2485 | if(block_length > 0) { |
| 2486 | /* bad metadata */ |
| 2487 | if(0 != seek_cb(handle, block_length, SEEK_CURcxx . . $ `<external>/14710646456994434043/fcntl.h:138:10`!)) |
| 2488 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 2489 | } |
| 2490 | |
| 2491 | return status; |
| 2492 | } |
| 2493 | |
| 2494 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_cuesheet_track_cb_cxx . . $ read_metadata_block_data_cuesheet_track_cb_(b218e9e6b35cb4a4).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_CueSheet_Trackcxx . . $ FLAC__StreamMetadata_CueSheet_Track# *track) |
| 2495 | { |
| 2496 | uint32_tcxx . . $ uint32_t# i, len; |
| 2497 | FLAC__bytecxx . . $ FLAC__byte# buffer[32]; /* asserted below that this is big enough */ |
| 2498 | |
| 2499 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= sizeof(FLAC__uint64)); |
| 2500 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN/8); |
| 2501 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= (FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN + FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN + FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN) / 8); |
| 2502 | |
| 2503 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN % 8 == 0); |
| 2504 | len = FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN. / 8; |
| 2505 | if(read_cb(buffer, 1, len, handle) != len) |
| 2506 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2507 | track->offsetcxx . . $ $anonymous_type_81a4853959168ec7_29#offset. = unpack_uint64_cxx . . $ unpack_uint64_(f323263d662f9058).(buffer, len); |
| 2508 | |
| 2509 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN % 8 == 0); |
| 2510 | len = FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN. / 8; |
| 2511 | if(read_cb(buffer, 1, len, handle) != len) |
| 2512 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2513 | track->numbercxx . . $ $anonymous_type_81a4853959168ec7_29#number. = (FLAC__bytecxx . . $ FLAC__byte#)unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer, len); |
| 2514 | |
| 2515 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN % 8 == 0); |
| 2516 | len = FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN. / 8; |
| 2517 | if(read_cb(track->isrccxx . . $ $anonymous_type_81a4853959168ec7_29#isrc., 1, len, handle) != len) |
| 2518 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2519 | |
| 2520 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!((FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN + FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN + FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN) % 8 == 0); |
| 2521 | len = (FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN. + FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN. + FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN.) / 8; |
| 2522 | if(read_cb(buffer, 1, len, handle) != len) |
| 2523 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2524 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN == 1); |
| 2525 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN == 1); |
| 2526 | track->typecxx . . $ $anonymous_type_81a4853959168ec7_29#type. = buffer[0] >> 7; |
| 2527 | track->pre_emphasiscxx . . $ $anonymous_type_81a4853959168ec7_29#pre_emphasis. = (buffer[0] >> 6) & 1; |
| 2528 | |
| 2529 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN % 8 == 0); |
| 2530 | len = FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN. / 8; |
| 2531 | if(read_cb(buffer, 1, len, handle) != len) |
| 2532 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2533 | track->num_indicescxx . . $ $anonymous_type_81a4853959168ec7_29#num_indices. = (FLAC__bytecxx . . $ FLAC__byte#)unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer, len); |
| 2534 | |
| 2535 | if(track->num_indicescxx . . $ $anonymous_type_81a4853959168ec7_29#num_indices. == 0) { |
| 2536 | track->indicescxx . . $ $anonymous_type_81a4853959168ec7_29#indices. = 0; |
| 2537 | } |
| 2538 | else if(0 == (track->indicescxx . . $ $anonymous_type_81a4853959168ec7_29#indices. = calloccxx . . $ calloc(63a7bf2941bfcd7a).(track->num_indicescxx . . $ $anonymous_type_81a4853959168ec7_29#num_indices., sizeof(FLAC__StreamMetadata_CueSheet_Indexcxx . . $ FLAC__StreamMetadata_CueSheet_Index#)))) |
| 2539 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 2540 | |
| 2541 | for(i = 0; i < track->num_indicescxx . . $ $anonymous_type_81a4853959168ec7_29#num_indices.; i++) { |
| 2542 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN % 8 == 0); |
| 2543 | len = FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN. / 8; |
| 2544 | if(read_cb(buffer, 1, len, handle) != len) |
| 2545 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2546 | track->indicescxx . . $ $anonymous_type_81a4853959168ec7_29#indices.[i].offsetcxx . . $ $anonymous_type_81a4853959168ec7_28#offset. = unpack_uint64_cxx . . $ unpack_uint64_(f323263d662f9058).(buffer, len); |
| 2547 | |
| 2548 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN % 8 == 0); |
| 2549 | len = FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN. / 8; |
| 2550 | if(read_cb(buffer, 1, len, handle) != len) |
| 2551 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2552 | track->indicescxx . . $ $anonymous_type_81a4853959168ec7_29#indices.[i].numbercxx . . $ $anonymous_type_81a4853959168ec7_28#number. = (FLAC__bytecxx . . $ FLAC__byte#)unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer, len); |
| 2553 | |
| 2554 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN % 8 == 0); |
| 2555 | len = FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN. / 8; |
| 2556 | if(read_cb(buffer, 1, len, handle) != len) |
| 2557 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2558 | } |
| 2559 | |
| 2560 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2561 | } |
| 2562 | |
| 2563 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_cuesheet_cb_cxx . . $ read_metadata_block_data_cuesheet_cb_(fe39bb7bcc8e812a).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_CueSheetcxx . . $ FLAC__StreamMetadata_CueSheet# *block) |
| 2564 | { |
| 2565 | uint32_tcxx . . $ uint32_t# i, len; |
| 2566 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# status; |
| 2567 | FLAC__bytecxx . . $ FLAC__byte# buffer[1024]; /* MSVC needs a constant expression so we put a magic number and assert */ |
| 2568 | |
| 2569 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!((FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN + FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN)/8 <= sizeof(buffer)); |
| 2570 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(FLAC__uint64) <= sizeof(buffer)); |
| 2571 | |
| 2572 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN % 8 == 0); |
| 2573 | len = FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN. / 8; |
| 2574 | if(read_cb(block->media_catalog_numbercxx . . $ $anonymous_type_81a4853959168ec7_30#media_catalog_number., 1, len, handle) != len) |
| 2575 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2576 | |
| 2577 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN % 8 == 0); |
| 2578 | len = FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN. / 8; |
| 2579 | if(read_cb(buffer, 1, len, handle) != len) |
| 2580 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2581 | block->lead_incxx . . $ $anonymous_type_81a4853959168ec7_30#lead_in. = unpack_uint64_cxx . . $ unpack_uint64_(f323263d662f9058).(buffer, len); |
| 2582 | |
| 2583 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!((FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN + FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN) % 8 == 0); |
| 2584 | len = (FLAC__STREAM_METADATA_CUESHEET_IS_CD_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN. + FLAC__STREAM_METADATA_CUESHEET_RESERVED_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN.) / 8; |
| 2585 | if(read_cb(buffer, 1, len, handle) != len) |
| 2586 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2587 | block->is_cdcxx . . $ $anonymous_type_81a4853959168ec7_30#is_cd. = buffer[0]&0x80? truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`! : falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2588 | |
| 2589 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN % 8 == 0); |
| 2590 | len = FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN. / 8; |
| 2591 | if(read_cb(buffer, 1, len, handle) != len) |
| 2592 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2593 | block->num_trackscxx . . $ $anonymous_type_81a4853959168ec7_30#num_tracks. = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer, len); |
| 2594 | |
| 2595 | if(block->num_trackscxx . . $ $anonymous_type_81a4853959168ec7_30#num_tracks. == 0) { |
| 2596 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA.; |
| 2597 | } |
| 2598 | else if(0 == (block->trackscxx . . $ $anonymous_type_81a4853959168ec7_30#tracks. = calloccxx . . $ calloc(63a7bf2941bfcd7a).(block->num_trackscxx . . $ $anonymous_type_81a4853959168ec7_30#num_tracks., sizeof(FLAC__StreamMetadata_CueSheet_Trackcxx . . $ FLAC__StreamMetadata_CueSheet_Track#)))) |
| 2599 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 2600 | |
| 2601 | for(i = 0; i < block->num_trackscxx . . $ $anonymous_type_81a4853959168ec7_30#num_tracks.; i++) { |
| 2602 | if(FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK. != (status = read_metadata_block_data_cuesheet_track_cb_cxx . . $ read_metadata_block_data_cuesheet_track_cb_(b218e9e6b35cb4a4).(handle, read_cb, block->trackscxx . . $ $anonymous_type_81a4853959168ec7_30#tracks. + i))) |
| 2603 | return status; |
| 2604 | } |
| 2605 | |
| 2606 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2607 | } |
| 2608 | |
| 2609 | static FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_picture_cstring_cb_cxx . . $ read_metadata_block_data_picture_cstring_cb_(58f76764ceb0d02b).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__bytecxx . . $ FLAC__byte# **data, FLAC__uint32cxx . . $ FLAC__uint32# *length, FLAC__uint32cxx . . $ FLAC__uint32# length_len) |
| 2610 | { |
| 2611 | FLAC__bytecxx . . $ FLAC__byte# buffer[sizeof(FLAC__uint32cxx . . $ FLAC__uint32#)]; |
| 2612 | |
| 2613 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != data); |
| 2614 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(length_len%8 == 0); |
| 2615 | |
| 2616 | length_len /= 8; /* convert to bytes */ |
| 2617 | |
| 2618 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= length_len); |
| 2619 | |
| 2620 | if(read_cb(buffer, 1, length_len, handle) != length_len) |
| 2621 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2622 | *length = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer, length_len); |
| 2623 | |
| 2624 | if(*length > (1u << FLAC__STREAM_METADATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_LENGTH_LEN.)) /* data cannot be larger than FLAC metadata block */ |
| 2625 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA.; |
| 2626 | |
| 2627 | if(0 != *data) |
| 2628 | freecxx . . $ free(5d22bdacc48458e8).(*data); |
| 2629 | |
| 2630 | if(0 == (*data = safe_malloc_add_2op_cxx . . $ safe_malloc_add_2op_(63a7bf2941bfcd7a).(*length, /*+*/1))) |
| 2631 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 2632 | |
| 2633 | if(*length > 0) { |
| 2634 | if(read_cb(*data, 1, *length, handle) != *length) |
| 2635 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2636 | } |
| 2637 | |
| 2638 | (*data)[*length] = '\0'; |
| 2639 | |
| 2640 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2641 | } |
| 2642 | |
| 2643 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_picture_cb_cxx . . $ read_metadata_block_data_picture_cb_(e5d5f6ea060a84ed).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_Picturecxx . . $ FLAC__StreamMetadata_Picture# *block) |
| 2644 | { |
| 2645 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# status; |
| 2646 | FLAC__bytecxx . . $ FLAC__byte# buffer[4]; /* asserted below that this is big enough */ |
| 2647 | FLAC__uint32cxx . . $ FLAC__uint32# len; |
| 2648 | |
| 2649 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_TYPE_LEN/8); |
| 2650 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN/8); |
| 2651 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN/8); |
| 2652 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN/8); |
| 2653 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_COLORS_LEN/8); |
| 2654 | |
| 2655 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_PICTURE_TYPE_LEN % 8 == 0); |
| 2656 | len = FLAC__STREAM_METADATA_PICTURE_TYPE_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_TYPE_LEN. / 8; |
| 2657 | if(read_cb(buffer, 1, len, handle) != len) |
| 2658 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2659 | block->typecxx . . $ $anonymous_type_81a4853959168ec7_32#type. = (FLAC__StreamMetadata_Picture_Typecxx . . $ FLAC__StreamMetadata_Picture_Type#)unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer, len); |
| 2660 | |
| 2661 | if((status = read_metadata_block_data_picture_cstring_cb_cxx . . $ read_metadata_block_data_picture_cstring_cb_(58f76764ceb0d02b).(handle, read_cb, (FLAC__bytecxx . . $ FLAC__byte#**)(&(block->mime_typecxx . . $ $anonymous_type_81a4853959168ec7_32#mime_type.)), &len, FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN.)) != FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.) |
| 2662 | return status; |
| 2663 | |
| 2664 | if((status = read_metadata_block_data_picture_cstring_cb_cxx . . $ read_metadata_block_data_picture_cstring_cb_(58f76764ceb0d02b).(handle, read_cb, &(block->descriptioncxx . . $ $anonymous_type_81a4853959168ec7_32#description.), &len, FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN.)) != FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.) |
| 2665 | return status; |
| 2666 | |
| 2667 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN % 8 == 0); |
| 2668 | len = FLAC__STREAM_METADATA_PICTURE_WIDTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN. / 8; |
| 2669 | if(read_cb(buffer, 1, len, handle) != len) |
| 2670 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2671 | block->widthcxx . . $ $anonymous_type_81a4853959168ec7_32#width. = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer, len); |
| 2672 | |
| 2673 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN % 8 == 0); |
| 2674 | len = FLAC__STREAM_METADATA_PICTURE_HEIGHT_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN. / 8; |
| 2675 | if(read_cb(buffer, 1, len, handle) != len) |
| 2676 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2677 | block->heightcxx . . $ $anonymous_type_81a4853959168ec7_32#height. = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer, len); |
| 2678 | |
| 2679 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN % 8 == 0); |
| 2680 | len = FLAC__STREAM_METADATA_PICTURE_DEPTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN. / 8; |
| 2681 | if(read_cb(buffer, 1, len, handle) != len) |
| 2682 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2683 | block->depthcxx . . $ $anonymous_type_81a4853959168ec7_32#depth. = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer, len); |
| 2684 | |
| 2685 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_PICTURE_COLORS_LEN % 8 == 0); |
| 2686 | len = FLAC__STREAM_METADATA_PICTURE_COLORS_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_COLORS_LEN. / 8; |
| 2687 | if(read_cb(buffer, 1, len, handle) != len) |
| 2688 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2689 | block->colorscxx . . $ $anonymous_type_81a4853959168ec7_32#colors. = unpack_uint32_cxx . . $ unpack_uint32_(1d7cbbd5718e4a4f).(buffer, len); |
| 2690 | |
| 2691 | /* for convenience we use read_metadata_block_data_picture_cstring_cb_() even though it adds an extra terminating NUL we don't use */ |
| 2692 | if((status = read_metadata_block_data_picture_cstring_cb_cxx . . $ read_metadata_block_data_picture_cstring_cb_(58f76764ceb0d02b).(handle, read_cb, &(block->datacxx . . $ $anonymous_type_81a4853959168ec7_32#data.), &(block->data_lengthcxx . . $ $anonymous_type_81a4853959168ec7_32#data_length.), FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN.)) != FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.) |
| 2693 | return status; |
| 2694 | |
| 2695 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2696 | } |
| 2697 | |
| 2698 | FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# read_metadata_block_data_unknown_cb_cxx . . $ read_metadata_block_data_unknown_cb_(96443185be7acd7b).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__StreamMetadata_Unknowncxx . . $ FLAC__StreamMetadata_Unknown# *block, uint32_tcxx . . $ uint32_t# block_length) |
| 2699 | { |
| 2700 | if(block_length == 0) { |
| 2701 | block->datacxx . . $ $anonymous_type_81a4853959168ec7_33#data. = 0; |
| 2702 | } |
| 2703 | else { |
| 2704 | if(0 == (block->datacxx . . $ $anonymous_type_81a4853959168ec7_33#data. = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(block_length))) |
| 2705 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 2706 | |
| 2707 | if(read_cb(block->datacxx . . $ $anonymous_type_81a4853959168ec7_33#data., 1, block_length, handle) != block_length) |
| 2708 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 2709 | } |
| 2710 | |
| 2711 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2712 | } |
| 2713 | |
| 2714 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_header_cxx . . $ write_metadata_block_header_(c3cf93eace4ac78).(FILEcxx . . $ FILE# *file, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block) |
| 2715 | { |
| 2716 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != file); |
| 2717 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != status); |
| 2718 | |
| 2719 | if(!write_metadata_block_header_cb_cxx . . $ write_metadata_block_header_cb_(71df1ec83e67c887).((FLAC__IOHandlecxx . . $ FLAC__IOHandle#)file, (FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write#)fwritecxx . . $ fwrite(ab0609fa07c47d6e)., block)) { |
| 2720 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR.; |
| 2721 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2722 | } |
| 2723 | |
| 2724 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2725 | } |
| 2726 | |
| 2727 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_cxx . . $ write_metadata_block_data_(c3cf93eace4ac78).(FILEcxx . . $ FILE# *file, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block) |
| 2728 | { |
| 2729 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != file); |
| 2730 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != status); |
| 2731 | |
| 2732 | if (write_metadata_block_data_cb_cxx . . $ write_metadata_block_data_cb_(71df1ec83e67c887).((FLAC__IOHandlecxx . . $ FLAC__IOHandle#)file, (FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write#)fwritecxx . . $ fwrite(ab0609fa07c47d6e)., block)) { |
| 2733 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.; |
| 2734 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2735 | } |
| 2736 | else { |
| 2737 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR.; |
| 2738 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2739 | } |
| 2740 | } |
| 2741 | |
| 2742 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_header_cb_cxx . . $ write_metadata_block_header_cb_(71df1ec83e67c887).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block) |
| 2743 | { |
| 2744 | FLAC__bytecxx . . $ FLAC__byte# buffer[FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!]; |
| 2745 | |
| 2746 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(block->length < (1u << FLAC__STREAM_METADATA_LENGTH_LEN)); |
| 2747 | /* double protection */ |
| 2748 | if(block->lengthcxx . . $ FLAC__StreamMetadata#length. >= (1u << FLAC__STREAM_METADATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_LENGTH_LEN.)) |
| 2749 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2750 | |
| 2751 | buffer[0] = (block->is_lastcxx . . $ FLAC__StreamMetadata#is_last.? 0x80 : 0) | (FLAC__bytecxx . . $ FLAC__byte#)block->typecxx . . $ FLAC__StreamMetadata#type.; |
| 2752 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->lengthcxx . . $ FLAC__StreamMetadata#length., buffer + 1, 3); |
| 2753 | |
| 2754 | if(write_cb(buffer, 1, FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!, handle) != FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`!) |
| 2755 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2756 | |
| 2757 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2758 | } |
| 2759 | |
| 2760 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_cb_cxx . . $ write_metadata_block_data_cb_(71df1ec83e67c887).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block) |
| 2761 | { |
| 2762 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != block); |
| 2763 | |
| 2764 | switch(block->typecxx . . $ FLAC__StreamMetadata#type.) { |
| 2765 | case FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.: |
| 2766 | return write_metadata_block_data_streaminfo_cb_cxx . . $ write_metadata_block_data_streaminfo_cb_(a91c5a2b86ba1b06).(handle, write_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info.); |
| 2767 | case FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.: |
| 2768 | return write_metadata_block_data_padding_cb_cxx . . $ write_metadata_block_data_padding_cb_(f9b2cbcdc511b496).(handle, write_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..paddingcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#padding., block->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 2769 | case FLAC__METADATA_TYPE_APPLICATIONcxx . . $ FLAC__METADATA_TYPE_APPLICATION.: |
| 2770 | return write_metadata_block_data_application_cb_cxx . . $ write_metadata_block_data_application_cb_(b9819cc5c4ff8465).(handle, write_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..applicationcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#application., block->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 2771 | case FLAC__METADATA_TYPE_SEEKTABLEcxx . . $ FLAC__METADATA_TYPE_SEEKTABLE.: |
| 2772 | return write_metadata_block_data_seektable_cb_cxx . . $ write_metadata_block_data_seektable_cb_(bbf293164247f37a).(handle, write_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..seek_tablecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#seek_table.); |
| 2773 | case FLAC__METADATA_TYPE_VORBIS_COMMENTcxx . . $ FLAC__METADATA_TYPE_VORBIS_COMMENT.: |
| 2774 | return write_metadata_block_data_vorbis_comment_cb_cxx . . $ write_metadata_block_data_vorbis_comment_cb_(45d9dbf5b91cf6dd).(handle, write_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment.); |
| 2775 | case FLAC__METADATA_TYPE_CUESHEETcxx . . $ FLAC__METADATA_TYPE_CUESHEET.: |
| 2776 | return write_metadata_block_data_cuesheet_cb_cxx . . $ write_metadata_block_data_cuesheet_cb_(702ae541a3a1d78c).(handle, write_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..cue_sheetcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#cue_sheet.); |
| 2777 | case FLAC__METADATA_TYPE_PICTUREcxx . . $ FLAC__METADATA_TYPE_PICTURE.: |
| 2778 | return write_metadata_block_data_picture_cb_cxx . . $ write_metadata_block_data_picture_cb_(e33dc757b6145ce8).(handle, write_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture.); |
| 2779 | default: |
| 2780 | return write_metadata_block_data_unknown_cb_cxx . . $ write_metadata_block_data_unknown_cb_(587119d020e838fc).(handle, write_cb, &block->datacxx . . $ FLAC__StreamMetadata#data..unknowncxx . . $ FLAC__StreamMetadata#$anonymous_type_34#unknown., block->lengthcxx . . $ FLAC__StreamMetadata#length.); |
| 2781 | } |
| 2782 | } |
| 2783 | |
| 2784 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_streaminfo_cb_cxx . . $ write_metadata_block_data_streaminfo_cb_(a91c5a2b86ba1b06).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_StreamInfocxx . . $ FLAC__StreamMetadata_StreamInfo# *block) |
| 2785 | { |
| 2786 | FLAC__bytecxx . . $ FLAC__byte# buffer[FLAC__STREAM_METADATA_STREAMINFO_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:557:9`!]; |
| 2787 | const uint32_tcxx . . $ uint32_t# channels1 = block->channelscxx . . $ $anonymous_type_81a4853959168ec7_21#channels. - 1; |
| 2788 | const uint32_tcxx . . $ uint32_t# bps1 = block->bits_per_samplecxx . . $ $anonymous_type_81a4853959168ec7_21#bits_per_sample. - 1; |
| 2789 | |
| 2790 | /* we are using hardcoded numbers for simplicity but we should |
| 2791 | * probably eventually write a bit-level packer and use the |
| 2792 | * _STREAMINFO_ constants. |
| 2793 | */ |
| 2794 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->min_blocksizecxx . . $ $anonymous_type_81a4853959168ec7_21#min_blocksize., buffer, 2); |
| 2795 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->max_blocksizecxx . . $ $anonymous_type_81a4853959168ec7_21#max_blocksize., buffer+2, 2); |
| 2796 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->min_framesizecxx . . $ $anonymous_type_81a4853959168ec7_21#min_framesize., buffer+4, 3); |
| 2797 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->max_framesizecxx . . $ $anonymous_type_81a4853959168ec7_21#max_framesize., buffer+7, 3); |
| 2798 | buffer[10] = (block->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_21#sample_rate. >> 12) & 0xff; |
| 2799 | buffer[11] = (block->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_21#sample_rate. >> 4) & 0xff; |
| 2800 | buffer[12] = ((block->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_21#sample_rate. & 0x0f) << 4) | (channels1 << 1) | (bps1 >> 4); |
| 2801 | buffer[13] = (FLAC__bytecxx . . $ FLAC__byte#)(((bps1 & 0x0f) << 4) | ((block->total_samplescxx . . $ $anonymous_type_81a4853959168ec7_21#total_samples. >> 32) & 0x0f)); |
| 2802 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).((FLAC__uint32cxx . . $ FLAC__uint32#)block->total_samplescxx . . $ $anonymous_type_81a4853959168ec7_21#total_samples., buffer+14, 4); |
| 2803 | memcpycxx . . $ memcpy(cc817cb175f282d).(buffer+18, block->md5sumcxx . . $ $anonymous_type_81a4853959168ec7_21#md5sum., 16); |
| 2804 | |
| 2805 | if(write_cb(buffer, 1, FLAC__STREAM_METADATA_STREAMINFO_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:557:9`!, handle) != FLAC__STREAM_METADATA_STREAMINFO_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:557:9`!) |
| 2806 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2807 | |
| 2808 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2809 | } |
| 2810 | |
| 2811 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_padding_cb_cxx . . $ write_metadata_block_data_padding_cb_(f9b2cbcdc511b496).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_Paddingcxx . . $ FLAC__StreamMetadata_Padding# *block, uint32_tcxx . . $ uint32_t# block_length) |
| 2812 | { |
| 2813 | uint32_tcxx . . $ uint32_t# i, n = block_length; |
| 2814 | FLAC__bytecxx . . $ FLAC__byte# buffer[1024]; |
| 2815 | |
| 2816 | (void)block; |
| 2817 | |
| 2818 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(buffer, 0, 1024); |
| 2819 | |
| 2820 | for(i = 0; i < n/1024; i++) |
| 2821 | if(write_cb(buffer, 1, 1024, handle) != 1024) |
| 2822 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2823 | |
| 2824 | n %= 1024; |
| 2825 | |
| 2826 | if(write_cb(buffer, 1, n, handle) != n) |
| 2827 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2828 | |
| 2829 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2830 | } |
| 2831 | |
| 2832 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_application_cb_cxx . . $ write_metadata_block_data_application_cb_(b9819cc5c4ff8465).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_Applicationcxx . . $ FLAC__StreamMetadata_Application# *block, uint32_tcxx . . $ uint32_t# block_length) |
| 2833 | { |
| 2834 | const uint32_tcxx . . $ uint32_t# id_bytes = FLAC__STREAM_METADATA_APPLICATION_ID_LENcxx . . $ FLAC__STREAM_METADATA_APPLICATION_ID_LEN. / 8; |
| 2835 | |
| 2836 | if(write_cb(block->idcxx . . $ $anonymous_type_81a4853959168ec7_23#id., 1, id_bytes, handle) != id_bytes) |
| 2837 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2838 | |
| 2839 | block_length -= id_bytes; |
| 2840 | |
| 2841 | if(write_cb(block->datacxx . . $ $anonymous_type_81a4853959168ec7_23#data., 1, block_length, handle) != block_length) |
| 2842 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2843 | |
| 2844 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2845 | } |
| 2846 | |
| 2847 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_seektable_cb_cxx . . $ write_metadata_block_data_seektable_cb_(bbf293164247f37a).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_SeekTablecxx . . $ FLAC__StreamMetadata_SeekTable# *block) |
| 2848 | { |
| 2849 | uint32_tcxx . . $ uint32_t# i; |
| 2850 | FLAC__bytecxx . . $ FLAC__byte# buffer[FLAC__STREAM_METADATA_SEEKPOINT_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:598:9`!]; |
| 2851 | |
| 2852 | for(i = 0; i < block->num_pointscxx . . $ $anonymous_type_81a4853959168ec7_25#num_points.; i++) { |
| 2853 | /* some MAGIC NUMBERs here */ |
| 2854 | pack_uint64_cxx . . $ pack_uint64_(1f08f972bc7cbafe).(block->pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points.[i].sample_numbercxx . . $ $anonymous_type_81a4853959168ec7_24#sample_number., buffer, 8); |
| 2855 | pack_uint64_cxx . . $ pack_uint64_(1f08f972bc7cbafe).(block->pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points.[i].stream_offsetcxx . . $ $anonymous_type_81a4853959168ec7_24#stream_offset., buffer+8, 8); |
| 2856 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points.[i].frame_samplescxx . . $ $anonymous_type_81a4853959168ec7_24#frame_samples., buffer+16, 2); |
| 2857 | if(write_cb(buffer, 1, FLAC__STREAM_METADATA_SEEKPOINT_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:598:9`!, handle) != FLAC__STREAM_METADATA_SEEKPOINT_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:598:9`!) |
| 2858 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2859 | } |
| 2860 | |
| 2861 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2862 | } |
| 2863 | |
| 2864 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_vorbis_comment_cb_cxx . . $ write_metadata_block_data_vorbis_comment_cb_(45d9dbf5b91cf6dd).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_VorbisCommentcxx . . $ FLAC__StreamMetadata_VorbisComment# *block) |
| 2865 | { |
| 2866 | uint32_tcxx . . $ uint32_t# i; |
| 2867 | const uint32_tcxx . . $ uint32_t# entry_length_len = FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN. / 8; |
| 2868 | const uint32_tcxx . . $ uint32_t# num_comments_len = FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LENcxx . . $ FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN. / 8; |
| 2869 | FLAC__bytecxx . . $ FLAC__byte# buffer[4]; /* magic number is asserted below */ |
| 2870 | |
| 2871 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(flac_maxcxx . . $ `external/flac/flac_private_macros.h:71:9`!(FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN, FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN) / 8 == sizeof(buffer)); |
| 2872 | |
| 2873 | pack_uint32_little_endian_cxx . . $ pack_uint32_little_endian_(948b2170e76063bc).(block->vendor_stringcxx . . $ $anonymous_type_81a4853959168ec7_27#vendor_string..lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length., buffer, entry_length_len); |
| 2874 | if(write_cb(buffer, 1, entry_length_len, handle) != entry_length_len) |
| 2875 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2876 | if(write_cb(block->vendor_stringcxx . . $ $anonymous_type_81a4853959168ec7_27#vendor_string..entrycxx . . $ $anonymous_type_81a4853959168ec7_26#entry., 1, block->vendor_stringcxx . . $ $anonymous_type_81a4853959168ec7_27#vendor_string..lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length., handle) != block->vendor_stringcxx . . $ $anonymous_type_81a4853959168ec7_27#vendor_string..lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.) |
| 2877 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2878 | |
| 2879 | pack_uint32_little_endian_cxx . . $ pack_uint32_little_endian_(948b2170e76063bc).(block->num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments., buffer, num_comments_len); |
| 2880 | if(write_cb(buffer, 1, num_comments_len, handle) != num_comments_len) |
| 2881 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2882 | |
| 2883 | for(i = 0; i < block->num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments.; i++) { |
| 2884 | pack_uint32_little_endian_cxx . . $ pack_uint32_little_endian_(948b2170e76063bc).(block->commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments.[i].lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length., buffer, entry_length_len); |
| 2885 | if(write_cb(buffer, 1, entry_length_len, handle) != entry_length_len) |
| 2886 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2887 | if(write_cb(block->commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments.[i].entrycxx . . $ $anonymous_type_81a4853959168ec7_26#entry., 1, block->commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments.[i].lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length., handle) != block->commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments.[i].lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.) |
| 2888 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2889 | } |
| 2890 | |
| 2891 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2892 | } |
| 2893 | |
| 2894 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_cuesheet_cb_cxx . . $ write_metadata_block_data_cuesheet_cb_(702ae541a3a1d78c).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_CueSheetcxx . . $ FLAC__StreamMetadata_CueSheet# *block) |
| 2895 | { |
| 2896 | uint32_tcxx . . $ uint32_t# i, j, len; |
| 2897 | FLAC__bytecxx . . $ FLAC__byte# buffer[1024]; /* asserted below that this is big enough */ |
| 2898 | |
| 2899 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= sizeof(FLAC__uint64)); |
| 2900 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN/8); |
| 2901 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= (FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN + FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN + FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN + FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN)/8); |
| 2902 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN/8); |
| 2903 | |
| 2904 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN % 8 == 0); |
| 2905 | len = FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN. / 8; |
| 2906 | if(write_cb(block->media_catalog_numbercxx . . $ $anonymous_type_81a4853959168ec7_30#media_catalog_number., 1, len, handle) != len) |
| 2907 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2908 | |
| 2909 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN % 8 == 0); |
| 2910 | len = FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN. / 8; |
| 2911 | pack_uint64_cxx . . $ pack_uint64_(1f08f972bc7cbafe).(block->lead_incxx . . $ $anonymous_type_81a4853959168ec7_30#lead_in., buffer, len); |
| 2912 | if(write_cb(buffer, 1, len, handle) != len) |
| 2913 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2914 | |
| 2915 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!((FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN + FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN) % 8 == 0); |
| 2916 | len = (FLAC__STREAM_METADATA_CUESHEET_IS_CD_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN. + FLAC__STREAM_METADATA_CUESHEET_RESERVED_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN.) / 8; |
| 2917 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(buffer, 0, len); |
| 2918 | if(block->is_cdcxx . . $ $anonymous_type_81a4853959168ec7_30#is_cd.) |
| 2919 | buffer[0] |= 0x80; |
| 2920 | if(write_cb(buffer, 1, len, handle) != len) |
| 2921 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2922 | |
| 2923 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN % 8 == 0); |
| 2924 | len = FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN. / 8; |
| 2925 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->num_trackscxx . . $ $anonymous_type_81a4853959168ec7_30#num_tracks., buffer, len); |
| 2926 | if(write_cb(buffer, 1, len, handle) != len) |
| 2927 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2928 | |
| 2929 | for(i = 0; i < block->num_trackscxx . . $ $anonymous_type_81a4853959168ec7_30#num_tracks.; i++) { |
| 2930 | FLAC__StreamMetadata_CueSheet_Trackcxx . . $ FLAC__StreamMetadata_CueSheet_Track# *track = block->trackscxx . . $ $anonymous_type_81a4853959168ec7_30#tracks. + i; |
| 2931 | |
| 2932 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN % 8 == 0); |
| 2933 | len = FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN. / 8; |
| 2934 | pack_uint64_cxx . . $ pack_uint64_(1f08f972bc7cbafe).(track->offsetcxx . . $ $anonymous_type_81a4853959168ec7_29#offset., buffer, len); |
| 2935 | if(write_cb(buffer, 1, len, handle) != len) |
| 2936 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2937 | |
| 2938 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN % 8 == 0); |
| 2939 | len = FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN. / 8; |
| 2940 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(track->numbercxx . . $ $anonymous_type_81a4853959168ec7_29#number., buffer, len); |
| 2941 | if(write_cb(buffer, 1, len, handle) != len) |
| 2942 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2943 | |
| 2944 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN % 8 == 0); |
| 2945 | len = FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN. / 8; |
| 2946 | if(write_cb(track->isrccxx . . $ $anonymous_type_81a4853959168ec7_29#isrc., 1, len, handle) != len) |
| 2947 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2948 | |
| 2949 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!((FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN + FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN + FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN) % 8 == 0); |
| 2950 | len = (FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN. + FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN. + FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN.) / 8; |
| 2951 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(buffer, 0, len); |
| 2952 | buffer[0] = (track->typecxx . . $ $anonymous_type_81a4853959168ec7_29#type. << 7) | (track->pre_emphasiscxx . . $ $anonymous_type_81a4853959168ec7_29#pre_emphasis. << 6); |
| 2953 | if(write_cb(buffer, 1, len, handle) != len) |
| 2954 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2955 | |
| 2956 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN % 8 == 0); |
| 2957 | len = FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN. / 8; |
| 2958 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(track->num_indicescxx . . $ $anonymous_type_81a4853959168ec7_29#num_indices., buffer, len); |
| 2959 | if(write_cb(buffer, 1, len, handle) != len) |
| 2960 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2961 | |
| 2962 | for(j = 0; j < track->num_indicescxx . . $ $anonymous_type_81a4853959168ec7_29#num_indices.; j++) { |
| 2963 | FLAC__StreamMetadata_CueSheet_Indexcxx . . $ FLAC__StreamMetadata_CueSheet_Index# *indx = track->indicescxx . . $ $anonymous_type_81a4853959168ec7_29#indices. + j; |
| 2964 | |
| 2965 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN % 8 == 0); |
| 2966 | len = FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN. / 8; |
| 2967 | pack_uint64_cxx . . $ pack_uint64_(1f08f972bc7cbafe).(indx->offsetcxx . . $ $anonymous_type_81a4853959168ec7_28#offset., buffer, len); |
| 2968 | if(write_cb(buffer, 1, len, handle) != len) |
| 2969 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2970 | |
| 2971 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN % 8 == 0); |
| 2972 | len = FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN. / 8; |
| 2973 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(indx->numbercxx . . $ $anonymous_type_81a4853959168ec7_28#number., buffer, len); |
| 2974 | if(write_cb(buffer, 1, len, handle) != len) |
| 2975 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2976 | |
| 2977 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN % 8 == 0); |
| 2978 | len = FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN. / 8; |
| 2979 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(buffer, 0, len); |
| 2980 | if(write_cb(buffer, 1, len, handle) != len) |
| 2981 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 2982 | } |
| 2983 | } |
| 2984 | |
| 2985 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 2986 | } |
| 2987 | |
| 2988 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_picture_cb_cxx . . $ write_metadata_block_data_picture_cb_(e33dc757b6145ce8).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_Picturecxx . . $ FLAC__StreamMetadata_Picture# *block) |
| 2989 | { |
| 2990 | uint32_tcxx . . $ uint32_t# len; |
| 2991 | size_tcxx . . $ size_t# slen; |
| 2992 | FLAC__bytecxx . . $ FLAC__byte# buffer[4]; /* magic number is asserted below */ |
| 2993 | |
| 2994 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 == FLAC__STREAM_METADATA_PICTURE_TYPE_LEN%8); |
| 2995 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 == FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN%8); |
| 2996 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 == FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN%8); |
| 2997 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 == FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN%8); |
| 2998 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 == FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN%8); |
| 2999 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 == FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN%8); |
| 3000 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 == FLAC__STREAM_METADATA_PICTURE_COLORS_LEN%8); |
| 3001 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 == FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN%8); |
| 3002 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_TYPE_LEN/8); |
| 3003 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN/8); |
| 3004 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN/8); |
| 3005 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN/8); |
| 3006 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN/8); |
| 3007 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN/8); |
| 3008 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_COLORS_LEN/8); |
| 3009 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(sizeof(buffer) >= FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN/8); |
| 3010 | |
| 3011 | len = FLAC__STREAM_METADATA_PICTURE_TYPE_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_TYPE_LEN./8; |
| 3012 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->typecxx . . $ $anonymous_type_81a4853959168ec7_32#type., buffer, len); |
| 3013 | if(write_cb(buffer, 1, len, handle) != len) |
| 3014 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3015 | |
| 3016 | len = FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN./8; |
| 3017 | slen = strlencxx . . $ strlen(751346f8406fd082).(block->mime_typecxx . . $ $anonymous_type_81a4853959168ec7_32#mime_type.); |
| 3018 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(slen, buffer, len); |
| 3019 | if(write_cb(buffer, 1, len, handle) != len) |
| 3020 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3021 | if(write_cb(block->mime_typecxx . . $ $anonymous_type_81a4853959168ec7_32#mime_type., 1, slen, handle) != slen) |
| 3022 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3023 | |
| 3024 | len = FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN./8; |
| 3025 | slen = strlencxx . . $ strlen(751346f8406fd082).((const char *)block->descriptioncxx . . $ $anonymous_type_81a4853959168ec7_32#description.); |
| 3026 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(slen, buffer, len); |
| 3027 | if(write_cb(buffer, 1, len, handle) != len) |
| 3028 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3029 | if(write_cb(block->descriptioncxx . . $ $anonymous_type_81a4853959168ec7_32#description., 1, slen, handle) != slen) |
| 3030 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3031 | |
| 3032 | len = FLAC__STREAM_METADATA_PICTURE_WIDTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN./8; |
| 3033 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->widthcxx . . $ $anonymous_type_81a4853959168ec7_32#width., buffer, len); |
| 3034 | if(write_cb(buffer, 1, len, handle) != len) |
| 3035 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3036 | |
| 3037 | len = FLAC__STREAM_METADATA_PICTURE_HEIGHT_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN./8; |
| 3038 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->heightcxx . . $ $anonymous_type_81a4853959168ec7_32#height., buffer, len); |
| 3039 | if(write_cb(buffer, 1, len, handle) != len) |
| 3040 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3041 | |
| 3042 | len = FLAC__STREAM_METADATA_PICTURE_DEPTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN./8; |
| 3043 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->depthcxx . . $ $anonymous_type_81a4853959168ec7_32#depth., buffer, len); |
| 3044 | if(write_cb(buffer, 1, len, handle) != len) |
| 3045 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3046 | |
| 3047 | len = FLAC__STREAM_METADATA_PICTURE_COLORS_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_COLORS_LEN./8; |
| 3048 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->colorscxx . . $ $anonymous_type_81a4853959168ec7_32#colors., buffer, len); |
| 3049 | if(write_cb(buffer, 1, len, handle) != len) |
| 3050 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3051 | |
| 3052 | len = FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN./8; |
| 3053 | pack_uint32_cxx . . $ pack_uint32_(948b2170e76063bc).(block->data_lengthcxx . . $ $anonymous_type_81a4853959168ec7_32#data_length., buffer, len); |
| 3054 | if(write_cb(buffer, 1, len, handle) != len) |
| 3055 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3056 | if(write_cb(block->datacxx . . $ $anonymous_type_81a4853959168ec7_32#data., 1, block->data_lengthcxx . . $ $anonymous_type_81a4853959168ec7_32#data_length., handle) != block->data_lengthcxx . . $ $anonymous_type_81a4853959168ec7_32#data_length.) |
| 3057 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3058 | |
| 3059 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3060 | } |
| 3061 | |
| 3062 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_data_unknown_cb_cxx . . $ write_metadata_block_data_unknown_cb_(587119d020e838fc).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# write_cb, const FLAC__StreamMetadata_Unknowncxx . . $ FLAC__StreamMetadata_Unknown# *block, uint32_tcxx . . $ uint32_t# block_length) |
| 3063 | { |
| 3064 | if(write_cb(block->datacxx . . $ $anonymous_type_81a4853959168ec7_33#data., 1, block_length, handle) != block_length) |
| 3065 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3066 | |
| 3067 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3068 | } |
| 3069 | |
| 3070 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_stationary_cxx . . $ write_metadata_block_stationary_(606680ad4cb8c5d4).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block) |
| 3071 | { |
| 3072 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.], SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 3073 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 3074 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3075 | } |
| 3076 | |
| 3077 | if(!write_metadata_block_header_cxx . . $ write_metadata_block_header_(c3cf93eace4ac78).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status., block)) |
| 3078 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3079 | |
| 3080 | if(!write_metadata_block_data_cxx . . $ write_metadata_block_data_(c3cf93eace4ac78).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status., block)) |
| 3081 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3082 | |
| 3083 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.], SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 3084 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 3085 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3086 | } |
| 3087 | |
| 3088 | return read_metadata_block_header_cxx . . $ read_metadata_block_header_(2e72b239d5ede54f).(iterator); |
| 3089 | } |
| 3090 | |
| 3091 | FLAC__boolcxx . . $ FLAC__bool# write_metadata_block_stationary_with_padding_cxx . . $ write_metadata_block_stationary_with_padding_(5ee4a6e34e3587d4).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block, uint32_tcxx . . $ uint32_t# padding_length, FLAC__boolcxx . . $ FLAC__bool# padding_is_last) |
| 3092 | { |
| 3093 | FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *padding; |
| 3094 | |
| 3095 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.], SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 3096 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 3097 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3098 | } |
| 3099 | |
| 3100 | block->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3101 | |
| 3102 | if(!write_metadata_block_header_cxx . . $ write_metadata_block_header_(c3cf93eace4ac78).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status., block)) |
| 3103 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3104 | |
| 3105 | if(!write_metadata_block_data_cxx . . $ write_metadata_block_data_(c3cf93eace4ac78).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status., block)) |
| 3106 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3107 | |
| 3108 | if(0 == (padding = FLAC__metadata_object_newcxx . . $ FLAC__metadata_object_new(7b74e093a0c25cb4).(FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.))) |
| 3109 | return FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 3110 | |
| 3111 | padding->is_lastcxx . . $ FLAC__StreamMetadata#is_last. = padding_is_last; |
| 3112 | padding->lengthcxx . . $ FLAC__StreamMetadata#length. = padding_length; |
| 3113 | |
| 3114 | if(!write_metadata_block_header_cxx . . $ write_metadata_block_header_(c3cf93eace4ac78).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status., padding)) { |
| 3115 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(padding); |
| 3116 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3117 | } |
| 3118 | |
| 3119 | if(!write_metadata_block_data_cxx . . $ write_metadata_block_data_(c3cf93eace4ac78).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status., padding)) { |
| 3120 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(padding); |
| 3121 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3122 | } |
| 3123 | |
| 3124 | FLAC__metadata_object_deletecxx . . $ FLAC__metadata_object_delete(584ecc423fe01cfd).(padding); |
| 3125 | |
| 3126 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.], SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 3127 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 3128 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3129 | } |
| 3130 | |
| 3131 | return read_metadata_block_header_cxx . . $ read_metadata_block_header_(2e72b239d5ede54f).(iterator); |
| 3132 | } |
| 3133 | |
| 3134 | FLAC__boolcxx . . $ FLAC__bool# rewrite_whole_file_cxx . . $ rewrite_whole_file_(e6b59472951b3ba4).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *block, FLAC__boolcxx . . $ FLAC__bool# append) |
| 3135 | { |
| 3136 | FILEcxx . . $ FILE# *tempfile = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3137 | char *tempfilename = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3138 | int fixup_is_last_code = 0; /* 0 => no need to change any is_last flags */ |
| 3139 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! fixup_is_last_flag_offset = -1; |
| 3140 | |
| 3141 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != block || append == falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!); |
| 3142 | |
| 3143 | if(iterator->is_lastcxx . . $ FLAC__Metadata_SimpleIterator#is_last.) { |
| 3144 | if(append) { |
| 3145 | fixup_is_last_code = 1; /* 1 => clear the is_last flag at the following offset */ |
| 3146 | fixup_is_last_flag_offset = iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.]; |
| 3147 | } |
| 3148 | else if(0 == block) { |
| 3149 | simple_iterator_push_cxx . . $ simple_iterator_push_(ce497eb305ff27be).(iterator); |
| 3150 | if(!FLAC__metadata_simple_iterator_prevcxx . . $ FLAC__metadata_simple_iterator_prev(2e72b239d5ede54f).(iterator)) { |
| 3151 | (void)simple_iterator_pop_cxx . . $ simple_iterator_pop_(2e72b239d5ede54f).(iterator); |
| 3152 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3153 | } |
| 3154 | fixup_is_last_code = -1; /* -1 => set the is_last the flag at the following offset */ |
| 3155 | fixup_is_last_flag_offset = iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.]; |
| 3156 | if(!simple_iterator_pop_cxx . . $ simple_iterator_pop_(2e72b239d5ede54f).(iterator)) |
| 3157 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3158 | } |
| 3159 | } |
| 3160 | |
| 3161 | if(!simple_iterator_copy_file_prefix_cxx . . $ simple_iterator_copy_file_prefix_(37c4edd3754a66ee).(iterator, &tempfile, &tempfilename, append)) |
| 3162 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3163 | |
| 3164 | if(0 != block) { |
| 3165 | if(!write_metadata_block_header_cxx . . $ write_metadata_block_header_(c3cf93eace4ac78).(tempfile, &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status., block)) { |
| 3166 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(&tempfile, &tempfilename); |
| 3167 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3168 | } |
| 3169 | |
| 3170 | if(!write_metadata_block_data_cxx . . $ write_metadata_block_data_(c3cf93eace4ac78).(tempfile, &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status., block)) { |
| 3171 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(&tempfile, &tempfilename); |
| 3172 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3173 | } |
| 3174 | } |
| 3175 | |
| 3176 | if(!simple_iterator_copy_file_postfix_cxx . . $ simple_iterator_copy_file_postfix_(242f7b08c1fbb351).(iterator, &tempfile, &tempfilename, fixup_is_last_code, fixup_is_last_flag_offset, block==0)) |
| 3177 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3178 | |
| 3179 | if(append) |
| 3180 | return FLAC__metadata_simple_iterator_nextcxx . . $ FLAC__metadata_simple_iterator_next(2e72b239d5ede54f).(iterator); |
| 3181 | |
| 3182 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3183 | } |
| 3184 | |
| 3185 | void simple_iterator_push_cxx . . $ simple_iterator_push_(ce497eb305ff27be).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 3186 | { |
| 3187 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->depth+1 < SIMPLE_ITERATOR_MAX_PUSH_DEPTHcxx . . $ `external/flac/flac_metadata_iterators.c:350:9`!); |
| 3188 | iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.+1] = iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.]; |
| 3189 | iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.++; |
| 3190 | } |
| 3191 | |
| 3192 | FLAC__boolcxx . . $ FLAC__bool# simple_iterator_pop_cxx . . $ simple_iterator_pop_(2e72b239d5ede54f).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator) |
| 3193 | { |
| 3194 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->depth > 0); |
| 3195 | iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.--; |
| 3196 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.], SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 3197 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 3198 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3199 | } |
| 3200 | |
| 3201 | return read_metadata_block_header_cxx . . $ read_metadata_block_header_(2e72b239d5ede54f).(iterator); |
| 3202 | } |
| 3203 | |
| 3204 | /* return meanings: |
| 3205 | * 0: ok |
| 3206 | * 1: read error |
| 3207 | * 2: seek error |
| 3208 | * 3: not a FLAC file |
| 3209 | */ |
| 3210 | uint32_tcxx . . $ uint32_t# seek_to_first_metadata_block_cb_cxx . . $ seek_to_first_metadata_block_cb_(7e14ee485b111c9a).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOCallback_Seekcxx . . $ FLAC__IOCallback_Seek# seek_cb) |
| 3211 | { |
| 3212 | FLAC__bytecxx . . $ FLAC__byte# buffer[4]; |
| 3213 | size_tcxx . . $ size_t# n; |
| 3214 | uint32_tcxx . . $ uint32_t# i; |
| 3215 | |
| 3216 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_SYNC_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:179:9`! == sizeof(buffer)); |
| 3217 | |
| 3218 | /* skip any id3v2 tag */ |
| 3219 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = 0; |
| 3220 | n = read_cb(buffer, 1, 4, handle); |
| 3221 | if(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!) |
| 3222 | return 1; |
| 3223 | else if(n != 4) |
| 3224 | return 3; |
| 3225 | else if(0 == memcmpcxx . . $ memcmp(36f949851efa3055).(buffer, "ID3", 3)) { |
| 3226 | uint32_tcxx . . $ uint32_t# tag_length = 0; |
| 3227 | |
| 3228 | /* skip to the tag length */ |
| 3229 | if(seek_cb(handle, 2, SEEK_CURcxx . . $ `<external>/14710646456994434043/fcntl.h:138:10`!) < 0) |
| 3230 | return 2; |
| 3231 | |
| 3232 | /* read the length */ |
| 3233 | for(i = 0; i < 4; i++) { |
| 3234 | if(read_cb(buffer, 1, 1, handle) < 1 || buffer[0] & 0x80) |
| 3235 | return 1; |
| 3236 | tag_length <<= 7; |
| 3237 | tag_length |= (buffer[0] & 0x7f); |
| 3238 | } |
| 3239 | |
| 3240 | /* skip the rest of the tag */ |
| 3241 | if(seek_cb(handle, tag_length, SEEK_CURcxx . . $ `<external>/14710646456994434043/fcntl.h:138:10`!) < 0) |
| 3242 | return 2; |
| 3243 | |
| 3244 | /* read the stream sync code */ |
| 3245 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = 0; |
| 3246 | n = read_cb(buffer, 1, 4, handle); |
| 3247 | if(errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!) |
| 3248 | return 1; |
| 3249 | else if(n != 4) |
| 3250 | return 3; |
| 3251 | } |
| 3252 | |
| 3253 | /* check for the fLaC signature */ |
| 3254 | if(0 == memcmpcxx . . $ memcmp(36f949851efa3055).(FLAC__STREAM_SYNC_STRINGcxx . . $ FLAC__STREAM_SYNC_STRING., buffer, FLAC__STREAM_SYNC_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:179:9`!)) |
| 3255 | return 0; |
| 3256 | else |
| 3257 | return 3; |
| 3258 | } |
| 3259 | |
| 3260 | uint32_tcxx . . $ uint32_t# seek_to_first_metadata_block_cxx . . $ seek_to_first_metadata_block_(9eef1996c458a0e7).(FILEcxx . . $ FILE# *f) |
| 3261 | { |
| 3262 | return seek_to_first_metadata_block_cb_cxx . . $ seek_to_first_metadata_block_cb_(7e14ee485b111c9a).((FLAC__IOHandlecxx . . $ FLAC__IOHandle#)f, (FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read#)freadcxx . . $ fread(738fc8ac1d711e58)., fseek_wrapper_cxx . . $ fseek_wrapper_(8bc0ff128761c75d).); |
| 3263 | } |
| 3264 | |
| 3265 | FLAC__boolcxx . . $ FLAC__bool# simple_iterator_copy_file_prefix_cxx . . $ simple_iterator_copy_file_prefix_(37c4edd3754a66ee).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FILEcxx . . $ FILE# **tempfile, char **tempfilename, FLAC__boolcxx . . $ FLAC__bool# append) |
| 3266 | { |
| 3267 | const FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! offset_end = append? iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.] + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. : iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.]; |
| 3268 | |
| 3269 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., 0, SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 3270 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 3271 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3272 | } |
| 3273 | if(!open_tempfile_cxx . . $ open_tempfile_(542af00b782cb0a6).(iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename., iterator->tempfile_path_prefixcxx . . $ FLAC__Metadata_SimpleIterator#tempfile_path_prefix., tempfile, tempfilename, &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status.)) { |
| 3274 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3275 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3276 | } |
| 3277 | if(!copy_n_bytes_from_file_cxx . . $ copy_n_bytes_from_file_(4aae65a1eaf6530d).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., *tempfile, offset_end, &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status.)) { |
| 3278 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3279 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3280 | } |
| 3281 | |
| 3282 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3283 | } |
| 3284 | |
| 3285 | FLAC__boolcxx . . $ FLAC__bool# simple_iterator_copy_file_postfix_cxx . . $ simple_iterator_copy_file_postfix_(242f7b08c1fbb351).(FLAC__Metadata_SimpleIteratorcxx . . $ FLAC__Metadata_SimpleIterator# *iterator, FILEcxx . . $ FILE# **tempfile, char **tempfilename, int fixup_is_last_code, FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! fixup_is_last_flag_offset, FLAC__boolcxx . . $ FLAC__bool# backup) |
| 3286 | { |
| 3287 | FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! save_offset = iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.]; |
| 3288 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != *tempfile); |
| 3289 | |
| 3290 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., save_offset + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length., SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 3291 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3292 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 3293 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3294 | } |
| 3295 | if(!copy_remaining_bytes_from_file_cxx . . $ copy_remaining_bytes_from_file_(2d4c80edcad7c5cd).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file., *tempfile, &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status.)) { |
| 3296 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3297 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3298 | } |
| 3299 | |
| 3300 | if(fixup_is_last_code != 0) { |
| 3301 | /* |
| 3302 | * if code == 1, it means a block was appended to the end so |
| 3303 | * we have to clear the is_last flag of the previous block |
| 3304 | * if code == -1, it means the last block was deleted so |
| 3305 | * we have to set the is_last flag of the previous block |
| 3306 | */ |
| 3307 | /* MAGIC NUMBERs here; we know the is_last flag is the high bit of the byte at this location */ |
| 3308 | FLAC__bytecxx . . $ FLAC__byte# x; |
| 3309 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(*tempfile, fixup_is_last_flag_offset, SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 3310 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3311 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 3312 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3313 | } |
| 3314 | if(freadcxx . . $ fread(738fc8ac1d711e58).(&x, 1, 1, *tempfile) != 1) { |
| 3315 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3316 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 3317 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3318 | } |
| 3319 | if(fixup_is_last_code > 0) { |
| 3320 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(x & 0x80); |
| 3321 | x &= 0x7f; |
| 3322 | } |
| 3323 | else { |
| 3324 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(!(x & 0x80)); |
| 3325 | x |= 0x80; |
| 3326 | } |
| 3327 | if(0 != fseekocxx . . $ fseeko(543fae30d249f6b1).(*tempfile, fixup_is_last_flag_offset, SEEK_SETcxx . . $ `<external>/14710646456994434043/fcntl.h:137:10`!)) { |
| 3328 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3329 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.; |
| 3330 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3331 | } |
| 3332 | if(local__fwritecxx . . $ `external/flac/flac_metadata_iterators.c:139:9`!(&x, 1, 1, *tempfile) != 1) { |
| 3333 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3334 | iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status. = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR.; |
| 3335 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3336 | } |
| 3337 | } |
| 3338 | |
| 3339 | (void)fclosecxx . . $ fclose(89bc1efcdac0ca22).(iterator->filecxx . . $ FLAC__Metadata_SimpleIterator#file.); |
| 3340 | |
| 3341 | if(!transport_tempfile_cxx . . $ transport_tempfile_(73e0dab43aae5506).(iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename., tempfile, tempfilename, &iterator->statuscxx . . $ FLAC__Metadata_SimpleIterator#status.)) |
| 3342 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3343 | |
| 3344 | if(iterator->has_statscxx . . $ FLAC__Metadata_SimpleIterator#has_stats.) |
| 3345 | set_file_stats_cxx . . $ set_file_stats_(a6d86f3aaa0bc44b).(iterator->filenamecxx . . $ FLAC__Metadata_SimpleIterator#filename., &iterator->statscxx . . $ FLAC__Metadata_SimpleIterator#stats.); |
| 3346 | |
| 3347 | if(!simple_iterator_prime_input_cxx . . $ simple_iterator_prime_input_(180443d5b2343f4c).(iterator, !iterator->is_writablecxx . . $ FLAC__Metadata_SimpleIterator#is_writable.)) |
| 3348 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3349 | if(backup) { |
| 3350 | while(iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.] + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)FLAC__STREAM_METADATA_HEADER_LENGTHcxx . . $ `external/flac/flac_FLAC_format.h:872:9`! + (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)iterator->lengthcxx . . $ FLAC__Metadata_SimpleIterator#length. < save_offset) |
| 3351 | if(!FLAC__metadata_simple_iterator_nextcxx . . $ FLAC__metadata_simple_iterator_next(2e72b239d5ede54f).(iterator)) |
| 3352 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3353 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3354 | } |
| 3355 | else { |
| 3356 | /* move the iterator to it's original block faster by faking a push, then doing a pop_ */ |
| 3357 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(iterator->depth == 0); |
| 3358 | iterator->offsetcxx . . $ FLAC__Metadata_SimpleIterator#offset.[0] = save_offset; |
| 3359 | iterator->depthcxx . . $ FLAC__Metadata_SimpleIterator#depth.++; |
| 3360 | return simple_iterator_pop_cxx . . $ simple_iterator_pop_(2e72b239d5ede54f).(iterator); |
| 3361 | } |
| 3362 | } |
| 3363 | |
| 3364 | FLAC__boolcxx . . $ FLAC__bool# copy_n_bytes_from_file_cxx . . $ copy_n_bytes_from_file_(4aae65a1eaf6530d).(FILEcxx . . $ FILE# *file, FILEcxx . . $ FILE# *tempfile, FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! bytes, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status) |
| 3365 | { |
| 3366 | FLAC__bytecxx . . $ FLAC__byte# buffer[8192]; |
| 3367 | size_tcxx . . $ size_t# n; |
| 3368 | |
| 3369 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(bytes >= 0); |
| 3370 | while(bytes > 0) { |
| 3371 | n = flac_mincxx . . $ `external/flac/flac_private_macros.h:67:9`!(sizeof(buffer), (size_t)bytes); |
| 3372 | if(freadcxx . . $ fread(738fc8ac1d711e58).(buffer, 1, n, file) != n) { |
| 3373 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 3374 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3375 | } |
| 3376 | if(local__fwritecxx . . $ `external/flac/flac_metadata_iterators.c:139:9`!(buffer, 1, n, tempfile) != n) { |
| 3377 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR.; |
| 3378 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3379 | } |
| 3380 | bytes -= n; |
| 3381 | } |
| 3382 | |
| 3383 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3384 | } |
| 3385 | |
| 3386 | FLAC__boolcxx . . $ FLAC__bool# copy_n_bytes_from_file_cb_cxx . . $ copy_n_bytes_from_file_cb_(21a1345fa71c3da1).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOHandlecxx . . $ FLAC__IOHandle# temp_handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# temp_write_cb, FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`! bytes, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status) |
| 3387 | { |
| 3388 | FLAC__bytecxx . . $ FLAC__byte# buffer[8192]; |
| 3389 | size_tcxx . . $ size_t# n; |
| 3390 | |
| 3391 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(bytes >= 0); |
| 3392 | while(bytes > 0) { |
| 3393 | n = flac_mincxx . . $ `external/flac/flac_private_macros.h:67:9`!(sizeof(buffer), (size_t)bytes); |
| 3394 | if(read_cb(buffer, 1, n, handle) != n) { |
| 3395 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 3396 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3397 | } |
| 3398 | if(temp_write_cb(buffer, 1, n, temp_handle) != n) { |
| 3399 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR.; |
| 3400 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3401 | } |
| 3402 | bytes -= n; |
| 3403 | } |
| 3404 | |
| 3405 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3406 | } |
| 3407 | |
| 3408 | FLAC__boolcxx . . $ FLAC__bool# copy_remaining_bytes_from_file_cxx . . $ copy_remaining_bytes_from_file_(2d4c80edcad7c5cd).(FILEcxx . . $ FILE# *file, FILEcxx . . $ FILE# *tempfile, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status) |
| 3409 | { |
| 3410 | FLAC__bytecxx . . $ FLAC__byte# buffer[8192]; |
| 3411 | size_tcxx . . $ size_t# n; |
| 3412 | |
| 3413 | while(!feofcxx . . $ feof(89bc1efcdac0ca22).(file)) { |
| 3414 | n = freadcxx . . $ fread(738fc8ac1d711e58).(buffer, 1, sizeof(buffer), file); |
| 3415 | if(n == 0 && !feofcxx . . $ feof(89bc1efcdac0ca22).(file)) { |
| 3416 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 3417 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3418 | } |
| 3419 | if(n > 0 && local__fwritecxx . . $ `external/flac/flac_metadata_iterators.c:139:9`!(buffer, 1, n, tempfile) != n) { |
| 3420 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR.; |
| 3421 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3422 | } |
| 3423 | } |
| 3424 | |
| 3425 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3426 | } |
| 3427 | |
| 3428 | FLAC__boolcxx . . $ FLAC__bool# copy_remaining_bytes_from_file_cb_cxx . . $ copy_remaining_bytes_from_file_cb_(98d7a5e9975a6a84).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__IOCallback_Readcxx . . $ FLAC__IOCallback_Read# read_cb, FLAC__IOCallback_Eofcxx . . $ FLAC__IOCallback_Eof# eof_cb, FLAC__IOHandlecxx . . $ FLAC__IOHandle# temp_handle, FLAC__IOCallback_Writecxx . . $ FLAC__IOCallback_Write# temp_write_cb, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status) |
| 3429 | { |
| 3430 | FLAC__bytecxx . . $ FLAC__byte# buffer[8192]; |
| 3431 | size_tcxx . . $ size_t# n; |
| 3432 | |
| 3433 | while(!eof_cb(handle)) { |
| 3434 | n = read_cb(buffer, 1, sizeof(buffer), handle); |
| 3435 | if(n == 0 && !eof_cb(handle)) { |
| 3436 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.; |
| 3437 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3438 | } |
| 3439 | if(n > 0 && temp_write_cb(buffer, 1, n, temp_handle) != n) { |
| 3440 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR.; |
| 3441 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3442 | } |
| 3443 | } |
| 3444 | |
| 3445 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3446 | } |
| 3447 | |
| 3448 | static int |
| 3449 | local_snprintfcxx . . $ local_snprintf(ea502d73e74c754c).(char *str, size_tcxx . . $ size_t# size, const char *fmt, ...) |
| 3450 | { |
| 3451 | va_listcxx . . $ va_list# va; |
| 3452 | int rc; |
| 3453 | |
| 3454 | #if defined _MSC_VER |
| 3455 | if (size == 0) |
| 3456 | return 1024; |
| 3457 | #endif |
| 3458 | |
| 3459 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`! (va, fmt); |
| 3460 | |
| 3461 | #if defined _MSC_VER |
| 3462 | rc = vsnprintf_s (str, size, _TRUNCATE, fmt, va); |
| 3463 | if (rc < 0) |
| 3464 | rc = size - 1; |
| 3465 | #elif defined __MINGW32__ |
| 3466 | rc = __mingw_vsnprintf (str, size, fmt, va); |
| 3467 | #else |
| 3468 | rc = vsnprintfcxx . . $ vsnprintf(a85eea89d1bd834f). (str, size, fmt, va); |
| 3469 | #endif |
| 3470 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`! (va); |
| 3471 | |
| 3472 | return rc; |
| 3473 | } |
| 3474 | |
| 3475 | FLAC__boolcxx . . $ FLAC__bool# open_tempfile_cxx . . $ open_tempfile_(542af00b782cb0a6).(const char *filename, const char *tempfile_path_prefix, FILEcxx . . $ FILE# **tempfile, char **tempfilename, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status) |
| 3476 | { |
| 3477 | static const char *tempfile_suffix = ".metadata_edit"; |
| 3478 | if(0 == tempfile_path_prefix) { |
| 3479 | size_tcxx . . $ size_t# dest_len = strlencxx . . $ strlen(751346f8406fd082).(filename) + strlencxx . . $ strlen(751346f8406fd082).(tempfile_suffix) + 1; |
| 3480 | if(0 == (*tempfilename = safe_malloc_cxx . . $ safe_malloc_(bfcfa4d6b7f7ef64).(dest_len))) { |
| 3481 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 3482 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3483 | } |
| 3484 | local_snprintfcxx . . $ local_snprintf(ea502d73e74c754c).(*tempfilename, dest_len, "%s%s", filename, tempfile_suffix); |
| 3485 | } |
| 3486 | else { |
| 3487 | const char *p = strrchrcxx . . $ strrchr(2050848944e00d54).(filename, '/'); |
| 3488 | size_tcxx . . $ size_t# dest_len; |
| 3489 | if(0 == p) |
| 3490 | p = filename; |
| 3491 | else |
| 3492 | p++; |
| 3493 | |
| 3494 | dest_len = strlencxx . . $ strlen(751346f8406fd082).(tempfile_path_prefix) + strlencxx . . $ strlen(751346f8406fd082).(p) + strlencxx . . $ strlen(751346f8406fd082).(tempfile_suffix) + 2; |
| 3495 | |
| 3496 | if(0 == (*tempfilename = safe_malloc_cxx . . $ safe_malloc_(bfcfa4d6b7f7ef64).(dest_len))) { |
| 3497 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 3498 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3499 | } |
| 3500 | local_snprintfcxx . . $ local_snprintf(ea502d73e74c754c).(*tempfilename, dest_len, "%s/%s%s", tempfile_path_prefix, p, tempfile_suffix); |
| 3501 | } |
| 3502 | |
| 3503 | if(0 == (*tempfile = flac_fopencxx . . $ `external/flac/flac_share_compat.h:200:9`!(*tempfilename, "w+b"))) { |
| 3504 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILEcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE.; |
| 3505 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3506 | } |
| 3507 | |
| 3508 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3509 | } |
| 3510 | |
| 3511 | FLAC__boolcxx . . $ FLAC__bool# transport_tempfile_cxx . . $ transport_tempfile_(73e0dab43aae5506).(const char *filename, FILEcxx . . $ FILE# **tempfile, char **tempfilename, FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# *status) |
| 3512 | { |
| 3513 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != filename); |
| 3514 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != tempfile); |
| 3515 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != *tempfile); |
| 3516 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != tempfilename); |
| 3517 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != *tempfilename); |
| 3518 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != status); |
| 3519 | |
| 3520 | (void)fclosecxx . . $ fclose(89bc1efcdac0ca22).(*tempfile); |
| 3521 | *tempfile = 0; |
| 3522 | |
| 3523 | #if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ || defined __EMX__ |
| 3524 | /* on some flavors of windows, flac_rename() will fail if the destination already exists */ |
| 3525 | if(flac_unlink(filename) < 0) { |
| 3526 | cleanup_tempfile_(tempfile, tempfilename); |
| 3527 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR; |
| 3528 | return false; |
| 3529 | } |
| 3530 | #endif |
| 3531 | |
| 3532 | #ifndef _WIN32 |
| 3533 | /* Need to check whether filename refers to a symlink or not */ |
| 3534 | { |
| 3535 | struct statcxx . . $ stat# filestat; |
| 3536 | if(lstatcxx . . $ lstat(a9cd1e23e96f423c).(filename, &filestat) != 0) { |
| 3537 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3538 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR.; |
| 3539 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3540 | } |
| 3541 | if(S_ISLNKcxx . . $ `<external>/531885356569766532/stat.h:133:10`!(filestat.st_mode)) { |
| 3542 | /* file is symlink, find out name of symlinked file */ |
| 3543 | char linked_name[1024]; |
| 3544 | ssize_tcxx . . $ ssize_t# len = readlinkcxx . . $ readlink(373c9bd46766ee5).(filename, linked_name, sizeof(linked_name) - 1); |
| 3545 | if (len == sizeof(linked_name) - 1) { |
| 3546 | /* name too long */ |
| 3547 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3548 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR.; |
| 3549 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3550 | } |
| 3551 | linked_name[len] = '\0'; |
| 3552 | |
| 3553 | if(0 != flac_renamecxx . . $ `external/flac/flac_share_compat.h:203:9`!(*tempfilename, linked_name)) { |
| 3554 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3555 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR.; |
| 3556 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3557 | } |
| 3558 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3559 | } |
| 3560 | /* else, continue with normale code */ |
| 3561 | } |
| 3562 | |
| 3563 | #endif |
| 3564 | |
| 3565 | |
| 3566 | |
| 3567 | /*@@@ to fully support the tempfile_path_prefix we need to update this piece to actually copy across filesystems instead of just flac_rename(): */ |
| 3568 | if(0 != flac_renamecxx . . $ `external/flac/flac_share_compat.h:203:9`!(*tempfilename, filename)) { |
| 3569 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3570 | *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR.; |
| 3571 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 3572 | } |
| 3573 | |
| 3574 | cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(tempfile, tempfilename); |
| 3575 | |
| 3576 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 3577 | } |
| 3578 | |
| 3579 | void cleanup_tempfile_cxx . . $ cleanup_tempfile_(e4e7c04ec6bed1f).(FILEcxx . . $ FILE# **tempfile, char **tempfilename) |
| 3580 | { |
| 3581 | if(0 != *tempfile) { |
| 3582 | (void)fclosecxx . . $ fclose(89bc1efcdac0ca22).(*tempfile); |
| 3583 | *tempfile = 0; |
| 3584 | } |
| 3585 | |
| 3586 | if(0 != *tempfilename) { |
| 3587 | (void)flac_unlinkcxx . . $ `external/flac/flac_share_compat.h:202:9`!(*tempfilename); |
| 3588 | freecxx . . $ free(5d22bdacc48458e8).(*tempfilename); |
| 3589 | *tempfilename = 0; |
| 3590 | } |
| 3591 | } |
| 3592 | |
| 3593 | FLAC__boolcxx . . $ FLAC__bool# get_file_stats_cxx . . $ get_file_stats_(a9cd1e23e96f423c).(const char *filename, struct flac_stat_scxx . . $ `external/flac/flac_share_compat.h:217:9`! *stats) |
| 3594 | { |
| 3595 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != filename); |
| 3596 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != stats); |
| 3597 | return (0 == flac_statcxx . . $ `external/flac/flac_share_compat.h:204:9`!(filename, stats)); |
| 3598 | } |
| 3599 | |
| 3600 | void set_file_stats_cxx . . $ set_file_stats_(a6d86f3aaa0bc44b).(const char *filename, struct flac_stat_scxx . . $ `external/flac/flac_share_compat.h:217:9`! *stats) |
| 3601 | { |
| 3602 | #if defined(_POSIX_C_SOURCEcxx . . $ `<external>/18206667465210621810/features.h:313:10`!) && (_POSIX_C_SOURCEcxx . . $ `<external>/18206667465210621810/features.h:313:10`! >= 200809L) && !defined(_WIN32) |
| 3603 | struct timespeccxx . . $ timespec# srctime[2] = {}; |
| 3604 | srctime[0].tv_seccxx . . $ timespec#tv_sec. = stats->st_atimecxx . . $ `<external>/16045971866008360577/struct_stat.h:77:11`!; |
| 3605 | srctime[1].tv_seccxx . . $ timespec#tv_sec. = stats->st_mtimecxx . . $ `<external>/16045971866008360577/struct_stat.h:78:11`!; |
| 3606 | #else |
| 3607 | struct utimbuf srctime; |
| 3608 | srctime.actime = stats->st_atime; |
| 3609 | srctime.modtime = stats->st_mtime; |
| 3610 | #endif |
| 3611 | |
| 3612 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != filename); |
| 3613 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0 != stats); |
| 3614 | |
| 3615 | (void)flac_chmodcxx . . $ `external/flac/flac_share_compat.h:201:9`!(filename, stats->st_modecxx . . $ stat#st_mode.); |
| 3616 | (void)flac_utimecxx . . $ `external/flac/flac_share_compat.h:207:9`!(filename, &srctime); |
| 3617 | #if !defined _MSC_VER && !defined __BORLANDC__ && !defined __MINGW32__ |
| 3618 | FLAC_CHECK_RETURNcxx . . $ `external/flac/flac_share_macros.h:42:9`!(chown(filename, stats->st_uid, -1)); |
| 3619 | FLAC_CHECK_RETURNcxx . . $ `external/flac/flac_share_macros.h:42:9`!(chown(filename, -1, stats->st_gid)); |
| 3620 | #endif |
| 3621 | } |
| 3622 | |
| 3623 | int fseek_wrapper_cxx . . $ fseek_wrapper_(8bc0ff128761c75d).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle, FLAC__int64cxx . . $ FLAC__int64# offset, int whence) |
| 3624 | { |
| 3625 | return fseekocxx . . $ fseeko(543fae30d249f6b1).((FILEcxx . . $ FILE#*)handle, (FLAC__off_tcxx . . $ `external/flac/flac_share_compat.h:72:9`!)offset, whence); |
| 3626 | } |
| 3627 | |
| 3628 | FLAC__int64cxx . . $ FLAC__int64# ftell_wrapper_cxx . . $ ftell_wrapper_(72c1818a5177f981).(FLAC__IOHandlecxx . . $ FLAC__IOHandle# handle) |
| 3629 | { |
| 3630 | return ftellocxx . . $ ftello(1dcafcd8ef4c6e6c).((FILEcxx . . $ FILE#*)handle); |
| 3631 | } |
| 3632 | |
| 3633 | FLAC__Metadata_ChainStatuscxx . . $ FLAC__Metadata_ChainStatus# get_equivalent_status_cxx . . $ get_equivalent_status_(eb007a2d0116948f).(FLAC__Metadata_SimpleIteratorStatuscxx . . $ FLAC__Metadata_SimpleIteratorStatus# status) |
| 3634 | { |
| 3635 | switch(status) { |
| 3636 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OKcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.: |
| 3637 | return FLAC__METADATA_CHAIN_STATUS_OKcxx . . $ FLAC__METADATA_CHAIN_STATUS_OK.; |
| 3638 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUTcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT.: |
| 3639 | return FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUTcxx . . $ FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUT.; |
| 3640 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILEcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE.: |
| 3641 | return FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILEcxx . . $ FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE.; |
| 3642 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILEcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE.: |
| 3643 | return FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILEcxx . . $ FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILE.; |
| 3644 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLEcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE.: |
| 3645 | return FLAC__METADATA_CHAIN_STATUS_NOT_WRITABLEcxx . . $ FLAC__METADATA_CHAIN_STATUS_NOT_WRITABLE.; |
| 3646 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA.: |
| 3647 | return FLAC__METADATA_CHAIN_STATUS_BAD_METADATAcxx . . $ FLAC__METADATA_CHAIN_STATUS_BAD_METADATA.; |
| 3648 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR.: |
| 3649 | return FLAC__METADATA_CHAIN_STATUS_READ_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_READ_ERROR.; |
| 3650 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR.: |
| 3651 | return FLAC__METADATA_CHAIN_STATUS_SEEK_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR.; |
| 3652 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR.: |
| 3653 | return FLAC__METADATA_CHAIN_STATUS_WRITE_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR.; |
| 3654 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR.: |
| 3655 | return FLAC__METADATA_CHAIN_STATUS_RENAME_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_RENAME_ERROR.; |
| 3656 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR.: |
| 3657 | return FLAC__METADATA_CHAIN_STATUS_UNLINK_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_UNLINK_ERROR.; |
| 3658 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR.: |
| 3659 | return FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR.; |
| 3660 | case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERRORcxx . . $ FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERROR.: |
| 3661 | default: |
| 3662 | return FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERRORcxx . . $ FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR.; |
| 3663 | } |
| 3664 | } |