Re: [AD] Pending patches request

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


>> So (rand()+(rand()>>16)) should solve the issue...
> 
> But it's ugly. Try to devise an elegant macro to hide this ugliness.

What about this then:

#ifdef ALLEGRO_LITTLE_ENDIAN
#define RAND()       rand()
#elif defined ALLEGRO_BIG_ENDIAN
#define RAND()       (rand()>>16)
#else
#error Unknown endianess!
#endif

Then replace rand() with RAND() all over test.c.
It gives good results here.

> I will too. The good news is that I can reproduce the failures on x86 by
> switching everything (code and data) to UTF16-BE. And it's a bit weird
> because if I swap back the first two bytes of message_it[], I get 'nuti' on
> the screen!

Heh, this is even weirder... When I tried it here, it displayed some
letters, but they weren't those :P
Can't remember which ones though (the 'n' for sure)

-- 
Angelo Mottola
a.mottola@xxxxxxxxxx





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/