[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] integer size
From: |
Bernd Warken |
Subject: |
[Groff] integer size |
Date: |
Mon, 29 Oct 2001 19:51:18 +0100 |
User-agent: |
Mutt/1.2.5i |
With the GNU compilers, the sizes of the int family types are sufficient
for the postprocessing. But maybe, we cannot rely on this, e.g. on
embedded systems.
Both the unsigned int (65536 for colors) and the int type (72000 for ps
resolution) need 32-bits integral types. The GNU libraries provide this
for standard (unsigned) int, but the ANSI C(++) have 16 bits by default
and allow to provide even lower limits.
So it would be better to use the fixed length types int32_t and uint32_t
provided by stdint.h . This file is marked as being
`ISO C99: 7.18 Integer types <stdint.h>
but I'm not sure if it is available everywhere. glib provides similar
types as well.
Maybe the safest way is to define abstract data types that are defined
by preprocessor conditionals.
These changes will affect many files, so it should be put onto the TODO
list. First the color stuff.
Bernd Warken
Re: [Groff] integer size, Werner LEMBERG, 2001/10/30