[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] integer size
From: |
Bernd Warken |
Subject: |
Re: [Groff] integer size |
Date: |
Tue, 30 Oct 2001 22:07:54 +0100 |
User-agent: |
Mutt/1.2.5i |
On Tue, Oct 30, 2001 at 09:03:47PM +0100, Werner LEMBERG wrote:
>
> > 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.
>
> I doubt this is worth the trouble. groff is not an application for
> embedded systems, and its libraries are used by groff only and rather
> useless for other applications.
>
But it is not cleanly programmed. It depends on the quite arbitrary
behavior of the GNU utilities to have the int types 32 bits, while
ANSI garantees only long to have that length.
I use the following clutch to optimize memory usage.
# define INTEGER_LENGTH (32 / 8)
# if sizeof(int) >= INTEGER_LENGTH
typedef int Integer;
# else
typedef long int Integer;
# endif
It's not too hard to implement this on the postprocessors.
BTW, I finished the libdriver/input.cc file. Do you need it urgently,
or are there some more days left for polishing?
Bernd
Re: [Groff] integer size, Werner LEMBERG, 2001/10/30
- Re: [Groff] integer size,
Bernd Warken <=