nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Development Questions. check Programs. register.


From: Tom Lane
Subject: Re: [Nmh-workers] Development Questions. check Programs. register.
Date: Wed, 19 Oct 2016 10:03:08 -0400

Ralph Corderoy <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]