Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: (NULL == 0) ?
- X-seq: zsh-workers 1201
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: A.Main@xxxxxxxxxxxxxxxxx (Zefram)
- Subject: Re: (NULL == 0) ?
- Date: Tue, 28 May 1996 00:41:30 +0200 (MET DST)
- Cc: A.Main@xxxxxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <25534.199605272211@xxxxxxxxxxxxxxxxxxxxxxx> from Zefram at "May 27, 96 11:11:48 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> >It is used to determine the size of buffers to store the string
> >representation of an integer. Just grep for 'SIZEOF_LONG \* 8'.
>
> If we change the `8' to `CHAR_BIT' (which will need to be determined at
> configuration time if there isn't a limits.h), it would be more
> portable. But we are assuming 8-bit bytes, as well as ASCII, in a lot
> of character handling code.
Bart wrote that ANSI C guarantees ASCII in the cases we need so that should
not cause any problems. I do not see where is is assumed that a char has 8
bits othar than buffer sizes. We do assume that char has at least 8 bits
but that's OK.
> >In hashtable.h it is assumed that sizeof(void*) >= sizeof(long).
>
> We should have a union there, as we do elsewhere. long and void * are
> sufficient, but it might be neater to have some other pointer types too
> (it would reduce casting, and would not decrease efficiency).
Here struct iparam is used for initialisation. It is used instead of
struct param since initialisation of a union might cause problems.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author