Thou shalt have no other gods before the ANSI C standard 1388
Thou shalt have no other gods before the ANSI C standard 1389
Hardly. Weren't you paying attention? It is not just 9-bit ones-complement architectures that DJB was dismissing, but *all* architectures other than one specific model. Easy != correct. It is not appreciably harder to do...
Douglas A. Gwyn students saying ones-complement!''
I think you're all missing two important points here.
1. A box that runs 9-bit chars 1's compliments typically won't be a target for commodity software e.g. X11, Mozilla, gaim, etc.... They're specialty boxes e.g. embedded PIC or something.
2. Being aware of and "protective of" are two different things. buttuming char==8 bits is not entirely smart, but buttuming that NULL != 0 bytes is while perhaps correct a waste of time. Most platforms will aim towards such standards ... BECAUSE ... it's a tendency. Using calloc() to allocate a struct that has pointers is just easier than mallocing and setting all the pointers to NULL manually...
I mean most people don't check the return of printf() despite the fact it might fail. That's just being practical because if printf fails the program is likely SIGTERM'ed.
How many people honestly think about the fact that close() can fail when they code?
Thou shalt have no other gods before the ANSI C standard 1390
David Wagner You're (intentionally?) missing the point. Most DSP software performs general-purpose functions in addition to array processing. Much C software is...
So... there portability issues to be aware of w.r.t. this thread
1. Sizes not guaranteed. Use the right type for the job. 2. "float = 0" doesn't mean 0x0000... 3. Nobody cares about 1s compliment machines. I can't even think of an example of one that was made ... AFTER ... my birth that I would EVER program in the course of my life.
Peace out y'all, Tom
Alt Folklore Computers Newsgroups