Re[2]: [AD] small typo in bmp.c

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


Hello,

>> Maybe in terms of the actual layout in disk files, but if you
>> shorten that field in Allegro it will make no difference to the
>> size of the structure (it'll be followed by two bytes of
>> padding), and if it's always sent to/from disk using pack_iputw
>> and pack_igetw, it will have no effect on the functionality
>> either.  It will only have effect if the struct is read from
>> disk or written to disk as a single block of data.

 Correct.But it should be a short according to the bmp spec.

BD> There's a good reason why it's an int rather than a short. To handle 16-bit
BD> values (ie. shorts) in Protected Mode, all x86 processors must use a prefix
BD> opcode before each instruction that would otherwise handle 32-bit values.
BD> This actually slows the program down, even though fewer bytes are being
BD> manipulated.

 I don't think this is the reason,otherwise there wouldn't be any
 shorts in *any* of the structs.I really think it's a typo :)

-- 
Best regards,
 Bogdan                            mailto:robotzel@xxxxxxxxxx

 War does not determine who is right.War determines who is Left...




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