On Tue, Dec 04, 2001 at 09:46:21AM -0500, Jeff Trawick wrote:
> Brian Pane <[EMAIL PROTECTED]> writes:
>
> > >+ printf("Pointer size: %d\n", sizeof(void *));
> >
> > How about
> > printf("Pointer size: %d bits\n", 8*sizeof(void*)); ?
> > to make it a bit less subtle?
>
> Yessir, that is a big improvement. If nobody comes up with a better
> scheme or expresses a preference for an APR symbol then I'll go with
> that.
8 is a magic number. How about
printf("Pointer size: %d bits\n", CHAR_BIT*sizeof(void*)); ?
to allow for any machine which has some other number of bits in a
(C-)byte.
#include <limits.h>
would be needed somewhere too, if it's not already there.
f
--
Francis Daly [EMAIL PROTECTED]