Rename _flac_stat to flac_stat_s.
This commit is contained in:
parent
608e246f52
commit
7dc5e3a8ff
@ -172,10 +172,10 @@
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define _flac_stat _stat64 /* stat struct */
|
||||
#define flac_stat_s _stat64 /* stat struct */
|
||||
#define flac_fstat _fstat64
|
||||
#else
|
||||
#define _flac_stat stat /* stat struct */
|
||||
#define flac_stat_s stat /* stat struct */
|
||||
#define flac_fstat fstat
|
||||
#endif
|
||||
|
||||
|
@ -2800,7 +2800,7 @@ FLAC__bool read_sane_extended(FILE *f, FLAC__uint32 *val, const char *fn)
|
||||
FLAC__bool fskip_ahead(FILE *f, FLAC__uint64 offset)
|
||||
{
|
||||
static unsigned char dump[8192];
|
||||
struct _flac_stat stb;
|
||||
struct flac_stat_s stb;
|
||||
|
||||
if(flac_fstat(fileno(f), &stb) == 0 && (stb.st_mode & S_IFMT) == S_IFREG)
|
||||
{
|
||||
|
@ -118,8 +118,8 @@ static FLAC__bool open_tempfile_(const char *filename, const char *tempfile_path
|
||||
static FLAC__bool transport_tempfile_(const char *filename, FILE **tempfile, char **tempfilename, FLAC__Metadata_SimpleIteratorStatus *status);
|
||||
static void cleanup_tempfile_(FILE **tempfile, char **tempfilename);
|
||||
|
||||
static FLAC__bool get_file_stats_(const char *filename, struct _flac_stat *stats);
|
||||
static void set_file_stats_(const char *filename, struct _flac_stat *stats);
|
||||
static FLAC__bool get_file_stats_(const char *filename, struct flac_stat_s *stats);
|
||||
static void set_file_stats_(const char *filename, struct flac_stat_s *stats);
|
||||
|
||||
static int fseek_wrapper_(FLAC__IOHandle handle, FLAC__int64 offset, int whence);
|
||||
static FLAC__int64 ftell_wrapper_(FLAC__IOHandle handle);
|
||||
@ -327,7 +327,7 @@ FLAC_API FLAC__bool FLAC__metadata_get_picture(const char *filename, FLAC__Strea
|
||||
struct FLAC__Metadata_SimpleIterator {
|
||||
FILE *file;
|
||||
char *filename, *tempfile_path_prefix;
|
||||
struct _flac_stat stats;
|
||||
struct flac_stat_s stats;
|
||||
FLAC__bool has_stats;
|
||||
FLAC__bool is_writable;
|
||||
FLAC__Metadata_SimpleIteratorStatus status;
|
||||
@ -1630,7 +1630,7 @@ FLAC_API FLAC__bool FLAC__metadata_chain_check_if_tempfile_needed(FLAC__Metadata
|
||||
|
||||
FLAC_API FLAC__bool FLAC__metadata_chain_write(FLAC__Metadata_Chain *chain, FLAC__bool use_padding, FLAC__bool preserve_file_stats)
|
||||
{
|
||||
struct _flac_stat stats;
|
||||
struct flac_stat_s stats;
|
||||
const char *tempfile_path_prefix = 0;
|
||||
FLAC__off_t current_length;
|
||||
|
||||
@ -3298,14 +3298,14 @@ void cleanup_tempfile_(FILE **tempfile, char **tempfilename)
|
||||
}
|
||||
}
|
||||
|
||||
FLAC__bool get_file_stats_(const char *filename, struct _flac_stat *stats)
|
||||
FLAC__bool get_file_stats_(const char *filename, struct flac_stat_s *stats)
|
||||
{
|
||||
FLAC__ASSERT(0 != filename);
|
||||
FLAC__ASSERT(0 != stats);
|
||||
return (0 == flac_stat(filename, stats));
|
||||
}
|
||||
|
||||
void set_file_stats_(const char *filename, struct _flac_stat *stats)
|
||||
void set_file_stats_(const char *filename, struct flac_stat_s *stats)
|
||||
{
|
||||
struct utimbuf srctime;
|
||||
|
||||
|
@ -3342,7 +3342,7 @@ FLAC__StreamDecoderTellStatus file_tell_callback_(const FLAC__StreamDecoder *dec
|
||||
|
||||
FLAC__StreamDecoderLengthStatus file_length_callback_(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data)
|
||||
{
|
||||
struct _flac_stat filestats;
|
||||
struct flac_stat_s filestats;
|
||||
(void)client_data;
|
||||
|
||||
if(decoder->private_->file == stdin)
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
void grabbag__file_copy_metadata(const char *srcpath, const char *destpath)
|
||||
{
|
||||
struct _flac_stat srcstat;
|
||||
struct flac_stat_s srcstat;
|
||||
struct utimbuf srctime;
|
||||
|
||||
if(0 == flac_stat(srcpath, &srcstat)) {
|
||||
@ -63,7 +63,7 @@ void grabbag__file_copy_metadata(const char *srcpath, const char *destpath)
|
||||
|
||||
FLAC__off_t grabbag__file_get_filesize(const char *srcpath)
|
||||
{
|
||||
struct _flac_stat srcstat;
|
||||
struct flac_stat_s srcstat;
|
||||
|
||||
if(0 == flac_stat(srcpath, &srcstat))
|
||||
return srcstat.st_size;
|
||||
@ -86,7 +86,7 @@ const char *grabbag__file_get_basename(const char *srcpath)
|
||||
|
||||
FLAC__bool grabbag__file_change_stats(const char *filename, FLAC__bool read_only)
|
||||
{
|
||||
struct _flac_stat stats;
|
||||
struct flac_stat_s stats;
|
||||
|
||||
if(0 == flac_stat(filename, &stats)) {
|
||||
#if !defined _MSC_VER && !defined __MINGW32__
|
||||
@ -145,7 +145,7 @@ FLAC__bool grabbag__file_are_same(const char *f1, const char *f2)
|
||||
CloseHandle(h2);
|
||||
return same;
|
||||
#else
|
||||
struct _flac_stat s1, s2;
|
||||
struct flac_stat_s s1, s2;
|
||||
return f1 && f2 && flac_stat(f1, &s1) == 0 && flac_stat(f2, &s2) == 0 && s1.st_ino == s2.st_ino && s1.st_dev == s2.st_dev;
|
||||
#endif
|
||||
}
|
||||
|
@ -69,14 +69,14 @@ const FLAC__byte * const GRABBAG__REPLAYGAIN_TAG_ALBUM_GAIN = (const FLAC__byte
|
||||
const FLAC__byte * const GRABBAG__REPLAYGAIN_TAG_ALBUM_PEAK = (const FLAC__byte * const)"REPLAYGAIN_ALBUM_PEAK";
|
||||
|
||||
|
||||
static FLAC__bool get_file_stats_(const char *filename, struct _flac_stat *stats)
|
||||
static FLAC__bool get_file_stats_(const char *filename, struct flac_stat_s *stats)
|
||||
{
|
||||
FLAC__ASSERT(0 != filename);
|
||||
FLAC__ASSERT(0 != stats);
|
||||
return (0 == flac_stat(filename, stats));
|
||||
}
|
||||
|
||||
static void set_file_stats_(const char *filename, struct _flac_stat *stats)
|
||||
static void set_file_stats_(const char *filename, struct flac_stat_s *stats)
|
||||
{
|
||||
FLAC__ASSERT(0 != filename);
|
||||
FLAC__ASSERT(0 != stats);
|
||||
@ -478,7 +478,7 @@ static const char *store_to_file_pre_(const char *filename, FLAC__Metadata_Chain
|
||||
|
||||
static const char *store_to_file_post_(const char *filename, FLAC__Metadata_Chain *chain, FLAC__bool preserve_modtime)
|
||||
{
|
||||
struct _flac_stat stats;
|
||||
struct flac_stat_s stats;
|
||||
const FLAC__bool have_stats = get_file_stats_(filename, &stats);
|
||||
|
||||
(void)grabbag__file_change_stats(filename, /*read_only=*/false);
|
||||
|
@ -258,14 +258,14 @@ bool transport_tempfile_(const char *filename, FILE **tempfile, char **tempfilen
|
||||
return true;
|
||||
}
|
||||
|
||||
bool get_file_stats_(const char *filename, struct _flac_stat *stats)
|
||||
bool get_file_stats_(const char *filename, struct flac_stat_s *stats)
|
||||
{
|
||||
FLAC__ASSERT(0 != filename);
|
||||
FLAC__ASSERT(0 != stats);
|
||||
return (0 == flac_stat(filename, stats));
|
||||
}
|
||||
|
||||
void set_file_stats_(const char *filename, struct _flac_stat *stats)
|
||||
void set_file_stats_(const char *filename, struct flac_stat_s *stats)
|
||||
{
|
||||
struct utimbuf srctime;
|
||||
|
||||
@ -328,7 +328,7 @@ static bool write_chain_(FLAC::Metadata::Chain &chain, bool use_padding, bool pr
|
||||
callbacks.eof = chain_eof_cb_;
|
||||
|
||||
if(chain.check_if_tempfile_needed(use_padding)) {
|
||||
struct _flac_stat stats;
|
||||
struct flac_stat_s stats;
|
||||
FILE *file, *tempfile;
|
||||
char *tempfilename;
|
||||
if(preserve_file_stats) {
|
||||
|
@ -243,14 +243,14 @@ static FLAC__bool transport_tempfile_(const char *filename, FILE **tempfile, cha
|
||||
return true;
|
||||
}
|
||||
|
||||
static FLAC__bool get_file_stats_(const char *filename, struct _flac_stat *stats)
|
||||
static FLAC__bool get_file_stats_(const char *filename, struct flac_stat_s *stats)
|
||||
{
|
||||
FLAC__ASSERT(0 != filename);
|
||||
FLAC__ASSERT(0 != stats);
|
||||
return (0 == flac_stat(filename, stats));
|
||||
}
|
||||
|
||||
static void set_file_stats_(const char *filename, struct _flac_stat *stats)
|
||||
static void set_file_stats_(const char *filename, struct flac_stat_s *stats)
|
||||
{
|
||||
struct utimbuf srctime;
|
||||
|
||||
@ -313,7 +313,7 @@ static FLAC__bool write_chain_(FLAC__Metadata_Chain *chain, FLAC__bool use_paddi
|
||||
callbacks.eof = chain_eof_cb_;
|
||||
|
||||
if(FLAC__metadata_chain_check_if_tempfile_needed(chain, use_padding)) {
|
||||
struct _flac_stat stats;
|
||||
struct flac_stat_s stats;
|
||||
FILE *file, *tempfile = 0;
|
||||
char *tempfilename;
|
||||
if(preserve_file_stats) {
|
||||
|
@ -142,7 +142,7 @@ FLAC__bool file_utils__generate_flacfile(FLAC__bool is_ogg, const char *output_f
|
||||
FLAC__stream_encoder_delete(encoder);
|
||||
|
||||
if(0 != output_filesize) {
|
||||
struct _flac_stat filestats;
|
||||
struct flac_stat_s filestats;
|
||||
|
||||
if(flac_stat(output_filename, &filestats) != 0)
|
||||
return false;
|
||||
|
@ -93,7 +93,7 @@ static unsigned local_rand_(void)
|
||||
|
||||
static FLAC__off_t get_filesize_(const char *srcpath)
|
||||
{
|
||||
struct _flac_stat srcstat;
|
||||
struct flac_stat_s srcstat;
|
||||
|
||||
if(0 == flac_stat(srcpath, &srcstat))
|
||||
return srcstat.st_size;
|
||||
|
Loading…
Reference in New Issue
Block a user