httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: cvs commit: apache-1.3/src/main util.c
Date Sun, 15 Mar 1998 20:22:50 GMT
Martin Kraemer wrote:
> 
> >   -#define TEST_CHAR(c, f)    (test_char_table[((unsigned char)(c)) & 0xff]
& (f))
> >   +/* we assume the folks using this ensure the char < 256 */
> >   +#define TEST_CHAR(c, f)    (test_char_table[(unsigned)(c)] & (f))
> 
> Wouldn't it have been sufficient to simply remove the "& 0xFF" part?
> The (unsigned char) cast guarantees results between 0 and 255 anyway.
> The new version doesn't guarantee an index in the range 0..255 any longer,
> since the sign expansion of a (signed) char is done before the cast to
> unsigned. So '\377'  ->  -1  ->  0xFFFFFFFFU now.

This is all to do with crap compilers, I believe. I wonder if Dean's
time wouldn't be better spend on the egcs effort (at least when it comes
to this stuff). OK, I'm joking. Don't leave us, Dean!

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Mime
View raw message