[gnu.gcc] control macro

rab@nutmeg.Berkeley.EDU (09/23/88)

Several of my old C programs used the following macro for control
characters:

#define CTRL(c)     ('c'&0x1f)

Since this no longer works with ansi c, I replaced it with the
following macro:

#define CTRL(c)     ((#c[0])&0x1f)

so CTRL(x) will expand to  (("x"[0])&0x1f)

Now, this works fine, but it is inefficient when compiled with gcc.
Since this code involves extracting data at a constant offset
from a constant array, it seems to me that an obvious optimization
would be to do it at compile time.