Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!ames!umd5!cvl!elsie!ado
From: ado@elsie.UUCP (Arthur David Olson)
Newsgroups: comp.lang.c
Subject: Re: ANSIfication of #define ctl(X) ('X' & 0x1f)
Message-ID: <8096@elsie.UUCP>
Date: 13 Jun 88 12:51:47 GMT
References: <37@feedme.UUCP> <8079@brl-smoke.ARPA>
Organization: NIH-LEC, Bethesda, MD
Lines: 19

> > More importantly, is there a way to do what I want to do without
> > changing the macro invocations?

> There isn't one.  Change the macro invocations.

For all practical purposes, change the header file to read

	#define LETR_A	'A'
	#define LETR_B	'B'
	/* ... */
	#define LETR_z	'z'

	#define CTRL(c)	((LETR_ ## c) & 037)

which will handle "calls" of CTRL with alphabetic arguments--the bulk of such
calls--correctly.  You then need only change the header file and any
non-alphabetic invocations (which the compiler politely lets you know about).
-- 
	ado@ncifcrf.gov			ADO is a trademark of Ampex.