示例#1
0
static byte const* get_gd3_str( byte const* in, byte const* end, char* field )
{
	byte const* mid = skip_gd3_str( in, end );
	int len = (mid - in) / 2 - 1;
	if ( len > 0 )
	{
		len = min( len, (int) Gme_File::max_field_ );
		field [len] = 0;
		for ( int i = 0; i < len; i++ )
			field [i] = (in [i * 2 + 1] ? '?' : in [i * 2]); // TODO: convert to utf-8
	}
	return mid;
}
示例#2
0
文件: vgm.c 项目: IlVerz/rockbox
static byte const* get_gd3_str( byte const* in, byte const* end, char* field )
{
    byte const* mid = skip_gd3_str( in, end );
    int len = (mid - in) / 2 - 1;
    if ( field && len > 0 )
    {
        len = len < (int) max_field ? len : (int) max_field;

        field [len] = 0;
        /* Conver to utf8 */
        utf16LEdecode( in, field, len );
        
        /* Copy string back to id3v2buf */
        strcpy( (char*) in, field );
    }
    return mid;
}
示例#3
0
static byte const* get_gd3_pair( byte const* in, byte const* end, char* field )
{
	return skip_gd3_str( get_gd3_str( in, end, field ), end );
}