Ralph Corderoy <ralph(_at_)inputplus(_dot_)co(_dot_)uk> writes:
Thinking about this a bit more. The "generate C at compile time" can be
dropped by
#ifndef NDEBUG
#if EOF != -1
#error "Please report this to nmh's authors."
#endif
FWIW, the POSIX standard specifies
The following macro name is defined as a negative integral constant
expression:
EOF End-of-file return value.
I've never heard of an implementation not using -1, though.
extern int ctype_identity[257]; /* [n] = n-1 */
#define isupper(c) ((isupper)((ctype_identity + 1)[c]))
...
#endif
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.
regards, tom lane
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers