Re: isspace etc and (int) typecast

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Tue, 27 Mar 2007 22:48:39 +0200

tis 2007-03-27 klockan 22:09 +0200 skrev Guido Serassio:

> It's almost clear, but I'm just a little confused on the logical side
> of the things: use an int argument to check for an unsigned char.
> Really a confusing prototype .....

The acceptable range is an unsigned char or EOF. EOF is a value outside
the range of unsigned char, usually -1 and therefore the int prototype.
Same kind of value range as you may get from getchar/getch/fgetc.

This whole char / signed char / unsigned char mess is a quite
problematic spot of the C language. Nearly impossible to get signedness
correctly without a lot of headache..

> Henrik, now I don't have a CVS access, if it's not a problem I will
> fix this in few days.

It's not a problem. The related code (the HTTP parser optimizations) is
not planned to be merged into 2.6 at the moment.

Regards
Henrik

Received on Tue Mar 27 2007 - 14:48:45 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Apr 01 2007 - 12:00:01 MDT