Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: (NULL == 0) ?



> >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