@ -187,7 +187,7 @@ struct _Magic
gulong offset ;
guint data_size ;
MagicCheckType magic_check ;
guint32 data_ tq mask;
guint32 data_ mask;
MagicData value ;
guint read_string : 1 ;
guint read_size : 1 ;
@ -364,16 +364,16 @@ magic_parse_type (Magic *magic,
{
string + = 1 ;
if ( string [ 0 ] = = ' 0 ' )
magic - > data_ tq mask = strtol ( string , & f , string [ 1 ] = = ' x ' ? 16 : 8 ) ;
magic - > data_ mask = strtol ( string , & f , string [ 1 ] = = ' x ' ? 16 : 8 ) ;
else
magic - > data_ tq mask = strtol ( string , & f , 10 ) ;
magic - > data_ mask = strtol ( string , & f , 10 ) ;
if ( f & & * f ! = 0 )
return FALSE ;
while ( * string )
string + + ;
}
else
magic - > data_ tq mask = 0xffffffff ;
magic - > data_ mask = 0xffffffff ;
return * string = = 0 ;
}
@ -464,31 +464,31 @@ magic_check_data (Magic *magic,
cmp = 1 ;
break ;
case MAGIC_CHECK_INT_EQUAL :
data - > v_int32 & = magic - > data_ tq mask;
data - > v_int32 & = magic - > data_ mask;
cmp = data - > v_int32 = = magic - > value . v_int32 ;
break ;
case MAGIC_CHECK_INT_GREATER :
data - > v_int32 & = magic - > data_ tq mask;
data - > v_int32 & = magic - > data_ mask;
cmp = data - > v_int32 > magic - > value . v_int32 ;
break ;
case MAGIC_CHECK_INT_SMALLER :
data - > v_int32 & = magic - > data_ tq mask;
data - > v_int32 & = magic - > data_ mask;
cmp = data - > v_int32 < magic - > value . v_int32 ;
break ;
case MAGIC_CHECK_UINT_GREATER :
data - > v_uint32 & = magic - > data_ tq mask;
data - > v_uint32 & = magic - > data_ mask;
cmp = data - > v_uint32 > magic - > value . v_uint32 ;
break ;
case MAGIC_CHECK_UINT_SMALLER :
data - > v_uint32 & = magic - > data_ tq mask;
data - > v_uint32 & = magic - > data_ mask;
cmp = data - > v_uint32 < magic - > value . v_uint32 ;
break ;
case MAGIC_CHECK_UINT_ZEROS :
data - > v_uint32 & = magic - > data_ tq mask;
data - > v_uint32 & = magic - > data_ mask;
cmp = ( data - > v_int32 & magic - > value . v_int32 ) = = 0 ;
break ;
case MAGIC_CHECK_UINT_ONES :
data - > v_uint32 & = magic - > data_ tq mask;
data - > v_uint32 & = magic - > data_ mask;
cmp = ( data - > v_int32 & magic - > value . v_int32 ) = = magic - > value . v_int32 ;
break ;
case MAGIC_CHECK_STRING_EQUAL :