> AFAIK sizeof(unsigned short) is not defined
anywhere :-).
(looks around office, sees six different architectures
where it's
sixteen bits)
Huh? It's pretty well-defined here.
Once upon a time, all the world was a VAX running 4.x. Then Sun
happened, and lots of code that "worked everywhere" broke.
Later, all the world was a 386/486/Pentium, SPARC, PowerPC, etc. Then
amd64 and sparc64 happened and lots of code that "worked everywhere"
broke.
Write to what the language promises, not what happens to be popular
today. Those who have to maintain your code in the future will thank
you.
Or don't. Those who fix it in the future will thank you for their job
security.
Or, of course, you could just not even pretend to write portably.
Sometimes that's a right answer; for example, when writing a driver for
an SBus device, I have no problem assuming I'm on a SPARC.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B