Robert Brown writes:
> I thought char was always unsigned. Signed and unsigned differentiates
> integers (only), or at least so I thought -- reserving the sign bit.
> You should just pack for char, at a guess.
In C, a char is a kind of integer, and so there is such a thing as an
"unsigned char".
In C, "char" can mean either "unsigned char" or "signed char",
depending on the platform. (Unlike other kinds of integers, which are
always signed by default.) The ANSI standard added the "signed"
keyword so you could talk about signed chars on architectures where the
default char was unsigned.
Signed chars are a huge rat's nest of bugs.
You should be able to just pack for char.
--
<kragen at pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
The power didn't go out on 2000-01-01 either. :)