[AD] MSVC problem with dat2c generated files

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


MSVC seems to have an undocumented feature: constant strings are limited
to 64k.
dat2c generates constant strings into the C-files.
In case of data file objects of type DATA (i.e. binary) it would be a
bit pity to assume arbitrary data to be at most 64k. I have no idea how
to solve this. A somewhat dirty solution would be to replace
const unsigned char name[4]="abcd";
with
const unsigned char name_tmp[2][2]={{97,98},{99,100}};
#define name (const unsigned char *)name_tmp
But I don't like it, any ideas?

Also in case of BMP the line array can easily grow to more than 64k. If
anyone know if the line array has to be in a single memory block, it
would be fine to know. An idea is to split the BMP string into separate
chunks, one for each line.

-- 
Christer Sandberg <csg01@xxxxxxxxxx>





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