#DEFINEs and how to process them out

Karl Heuer karl at ima.isc.com
Fri Dec 14 17:42:02 AEST 1990


In article <2362 at ukc> tlg at ukc.ac.uk (T.L.Goodwin) writes:
>[Someone asks:]
>>I want a program to scan through my C source and process the #ifdefs...
>
>Use   cc -E file.c   [or equivalent]

The example made the question ambiguous.  If the intent was to process the
#ifdef directives *without* expanding all the #defines, then the problem is
more interesting.  Things to check: `unifdef', `cpp -S'; the comp.sources
archives; the Free Software Foundation.

Exercise: if none of the above work, design and implement such a tool and
release it as Freeware.

Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list