Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!emory!att!att!ima!dirtydog!karl From: karl@ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: #DEFINEs and how to process them out Message-ID: <1990Dec14.064202.4409@dirtydog.ima.isc.com> Date: 14 Dec 90 06:42:02 GMT References: <11085@ur-cc.UUCP> <2362@ukc> Sender: news@dirtydog.ima.isc.com (NEWS ADMIN) Reply-To: karl@ima.isc.com (Karl Heuer) Organization: Interactive Systems Lines: 15 In article <2362@ukc> tlg@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@ima.isc.com or uunet!ima!karl), The Walking Lint