Ignore:
Timestamp:
12/29/06 15:21:35 (17 years ago)
Author:
r2d
Message:
  • moved libmpcdec includes in /mpc
  • removed mppdec.h and mpp.h
  • mpcenc defines cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/branches/r2d/mpcenc/tags.c

    r194 r195  
    6060
    6161struct 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 footer
    65     Uint8_t   TagCount [4];    // the number of fields in the tag
    66     Uint8_t   Flags    [4];    // the tag flags (none currently defined)
    67     Uint8_t   Reserved [8];    // reserved for later use
     62    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
    6868};
    6969
     
    608608        return 0;
    609609
    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)
    611611        return 0;
    612612
     
    614614        if ( ( src [1] & 0xFC ) == 0xDC )
    615615            return 0;
    616         if ( src [1] == 0xFF  &&  ( src [0] & 0xFE ) == 0xFE )
     616                if ( src [1] == (char)0xFF  &&  ( src [0] & 0xFE ) == 0xFE )
    617617            return 0;
    618618        if ( ( src [1] & 0xFC ) == 0xD8 ) {
     
    796796
    797797
    798 static int Cdecl
     798static int mpc_cdecl
    799799cmpfn2 ( const void* p1, const void* p2 )
    800800{
     
    910910CopyTags_ID3 ( FILE* fp )
    911911{
    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 ) )
    915915        return -1;
    916916
     
    948948Read_LE_Uint32 ( const unsigned char* p )
    949949{
    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);
    954954}
    955955
     
    958958CopyTags_APE ( FILE* fp )
    959959{
    960     Uint32_t                   len;
    961     Uint32_t                   flags;
    962     Uint32_t                   version;
     960    mpc_uint32_t               len;
     961    mpc_uint32_t               flags;
     962    mpc_uint32_t               version;
    963963    unsigned char              buff [32768];
    964964    unsigned char              key [257];
    965965    unsigned char*             p;
    966966    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 ) )
    972971        return -1;
    973972    if ( sizeof(T) != READ ( fp, &T, sizeof T ) )
     
    981980    if ( TagLen <= sizeof T )
    982981        return -1;
    983     if ( -1 == SEEK ( fp, -(long)TagLen, SEEK_END ) )
     982    if ( -1 == fseek ( fp, -(long)TagLen, SEEK_END ) )
    984983        return -1;
    985984    memset ( buff, 0, sizeof(buff) );
Note: See TracChangeset for help on using the changeset viewer.