Changeset 195 for libmpc/branches/r2d/mpcenc/tags.c
- Timestamp:
- 12/29/06 15:21:35 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/mpcenc/tags.c
r194 r195 60 60 61 61 struct APETagFooterStruct { 62 Uint8_t ID [8]; // should equal 'APETAGEX'63 Uint8_t Version [4]; // currently 1000 (version 1.000)64 Uint8_t Length [4]; // the complete size of the tag, including this footer65 Uint8_t TagCount [4]; // the number of fields in the tag66 Uint8_t Flags [4]; // the tag flags (none currently defined)67 Uint8_t Reserved [8]; // reserved for later use62 mpc_uint8_t ID [8]; // should equal 'APETAGEX' 63 mpc_uint8_t Version [4]; // currently 1000 (version 1.000) 64 mpc_uint8_t Length [4]; // the complete size of the tag, including this footer 65 mpc_uint8_t TagCount [4]; // the number of fields in the tag 66 mpc_uint8_t Flags [4]; // the tag flags (none currently defined) 67 mpc_uint8_t Reserved [8]; // reserved for later use 68 68 }; 69 69 … … 608 608 return 0; 609 609 610 if ( src [0] != 0xFF || src [1] != 0xFE )// Microsoft Unicode preample (also useful to detect endianess, but currently only little endian is supported)610 if ( src [0] != (char)0xFF || src [1] != (char)0xFE ) // Microsoft Unicode preample (also useful to detect endianess, but currently only little endian is supported) 611 611 return 0; 612 612 … … 614 614 if ( ( src [1] & 0xFC ) == 0xDC ) 615 615 return 0; 616 if ( src [1] ==0xFF && ( src [0] & 0xFE ) == 0xFE )616 if ( src [1] == (char)0xFF && ( src [0] & 0xFE ) == 0xFE ) 617 617 return 0; 618 618 if ( ( src [1] & 0xFC ) == 0xD8 ) { … … 796 796 797 797 798 static int Cdecl798 static int mpc_cdecl 799 799 cmpfn2 ( const void* p1, const void* p2 ) 800 800 { … … 910 910 CopyTags_ID3 ( FILE* fp ) 911 911 { 912 Uint8_t tmp [128];913 914 if ( -1 == SEEK( fp, -128L, SEEK_END ) )912 mpc_uint8_t tmp [128]; 913 914 if ( -1 == fseek ( fp, -128L, SEEK_END ) ) 915 915 return -1; 916 916 … … 948 948 Read_LE_Uint32 ( const unsigned char* p ) 949 949 { 950 return (( Uint32_t)p[0] << 0) |951 (( Uint32_t)p[1] << 8) |952 (( Uint32_t)p[2] << 16) |953 (( Uint32_t)p[3] << 24);950 return ((mpc_uint32_t)p[0] << 0) | 951 ((mpc_uint32_t)p[1] << 8) | 952 ((mpc_uint32_t)p[2] << 16) | 953 ((mpc_uint32_t)p[3] << 24); 954 954 } 955 955 … … 958 958 CopyTags_APE ( FILE* fp ) 959 959 { 960 Uint32_tlen;961 Uint32_tflags;962 Uint32_tversion;960 mpc_uint32_t len; 961 mpc_uint32_t flags; 962 mpc_uint32_t version; 963 963 unsigned char buff [32768]; 964 964 unsigned char key [257]; 965 965 unsigned char* p; 966 966 struct APETagFooterStruct T; 967 Uint32_t TagLen; 968 Uint32_t TagCount; 969 // Uint32_t tmp; 970 971 if ( -1 == SEEK ( fp, -(long)sizeof T, SEEK_END ) ) 967 mpc_uint32_t TagLen; 968 mpc_uint32_t TagCount; 969 970 if ( -1 == fseek ( fp, -(long)sizeof T, SEEK_END ) ) 972 971 return -1; 973 972 if ( sizeof(T) != READ ( fp, &T, sizeof T ) ) … … 981 980 if ( TagLen <= sizeof T ) 982 981 return -1; 983 if ( -1 == SEEK( fp, -(long)TagLen, SEEK_END ) )982 if ( -1 == fseek ( fp, -(long)TagLen, SEEK_END ) ) 984 983 return -1; 985 984 memset ( buff, 0, sizeof(buff) );
Note: See TracChangeset
for help on using the changeset viewer.