Re: [AD] unicode.c patch

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


On Sun, Oct 15, 2000 at 12:33:48PM +0700, Michael Bukin wrote:
> I don't have documentation for C standard with these new data types.
> Are they defined to be exactly that number of bits, or at least that
> number of bits?

There are some types for each.  Some are exact, some are
minimum-width (`at least'), some are fastest minimum-width, some
are the widest possible integers.

>                  Is certain C integer type defined, if platform does
> not have integer type with that number of bits?

No.  The exact-width ones may be undefined, in which case
associated macros will also be undefined (so preprocessor
directives can bypass that code).  The minimum-width ones must all
be defined (8,16,32,64 bits, signed and unsigned flavours), and
also the fastest minimum-width ones (same flavours).  The widest
possible integers must exist.

I agree with the things you said, that this wouldn't really
increase portability, except in the 64-bit case (but I doubt
MSVC will support that for another 10 years or so).  So, we
can't rely on any of these for portability; the only place I can
think of where they'd be useful is for accessing lines of
bitmaps in Unix, but then you've already chosen to always make
16-bit bitmaps appear as arrays of shorts, whatever that width
might be, and 24- and 32-bit ones as arrays of longs (IIRC).

George

-- 
Random project update:
22/06/2000: AllegroGL documentation:  http://allegrogl.sourceforge.net/
        See under `Documentation' for the AllegroGL Reference Manual in
        various formats.



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