Hi Tom, > I've never heard of an implementation not using -1, though.
Me neither, and that's what the code's depending on thus the #error otherwise. (Would be quite interesting to find such a platform. :-) > > extern int ctype_identity[257]; /* [n] = n-1 */ > > #define isupper(c) ((isupper)((ctype_identity + 1)[c])) > > I'm not sure what the point is here, but have you considered that the > input might be either signed or unsigned char? If it's signed, this > coding won't work. IIRC from the git commit log, this is attributed as your idea. :-) The compiler will warn if type char is used as an array index, regardless of whether it's signed or unsigned here, because it might be signed elsewhere and the code wouldn't work as expected. So the above needs c to be of type unsigned char, for example, to avoid the compiler warning. It's the warning we're after to catch `isdigit(*s)' instead of `isdigit((unsigned char)*s)'. -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy _______________________________________________ Nmh-workers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
