[vlc-devel] Re: CVS Commit (jpsaman)

Jean-Paul Saman jean-paul.saman at planet.nl
Sun Dec 7 16:42:15 CET 2003


Sigmund Augdal wrote:

>On Sat, Dec 06, 2003 at 11:53:07PM +0100, cvs at videolan.org wrote:
>  
>
>>Update of /var/cvs/videolan/vlc/modules/misc
>>Modified Files:
>>	freetype.c 
>>Log Message:
>>Always use correct datatypes.
>>    
>>
>Are you sure this change still works? The code in question (used to) check
>for the msb in each char to properly decode utf-8. "char" is sometimes
>signed, and then the code will not work. There should be a warning though.
>
>Sigmund
>
>  
>
It looks allright to me. In the function AddText() the only exiting 
thing that is done with the char* psz_string is:

        char *p_in_buffer, *p_out_buffer;

        p_in_buffer = psz_string;
        i_ret = iconv( iconv_handle, &p_in_buffer, &i_in_bytes, 
&p_out_buffer, &i_out_bytes_left );

and p_in_buffer is char * anyway. So I say this is correct.

Anyway if this is supposed to be unsigned? then we better make it 
unsigned, that will make it better protable.
On Intel it will be signed by default. Arm makes it unsigned by default.

-- 


Many greetings,
Jean-Paul Saman

Consultant/Freelancer
--------------------------------------------------------------
VLC iPAQ maintainer                    http://www.videolan.org
--------------------------------------------------------------
RedHat Certified Engineer         RHCE number: 807202745005548
--------------------------------------------------------------


-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list