On Jun 18, 2007, at 2:44 PM, matthiasm wrote:
>
> On Jun 18, 2007, at 2:01 PM, MacArthur, Ian ((SELEX)) ((UK)) wrote:
>
>> In fltk-1.1, the character mapping tables "static uchar
>> latin2roman[256]" and "static uchar roman2latin[256]" appear twice in
>> the code (in separate link units) depending on whether you are OSX or
>> not. I.e. they are defined in fl_encoding_mac_roman.cxx and in
>> fl_encoding_latin1.cxx.
>>
>> Oddly, though, the tables (although the values are identical) are
>> declared with different size - the "Mac" versions are declared as 256
>> entries (which is correct) whilst the non-Mac latin1 tables are
>> declared
>> as 128 elements - which does not match the actual...
>>
>> Seems strange - is this intended?
>
> Hmm, I will check that. The size is supposed to be 128 because only
> the upper 128 characters in these mappings differ.

OK, 128 is the correct count for both:

if (c>127) *dst = table[c-128];

The table exists twice, but will never be compiled in more than once.  
If you happen to statically link with only one of the conversions,  
which happens to be the native one, the table will not be linked at  
all (which could not be done if there was only a single table).

So if you are on a Mac and use fl_local_to_mac_roman(), which is  
obviously a trivial "translation", you will not link a table into  
your binaries. We do anything to save you space ;-)

Matthias

----
http://robowerk.com/


_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to