Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site osiris.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!aplcen!osiris!phil From: phil@osiris.UUCP (Philip Kos) Newsgroups: net.wanted.sources Subject: partial preprocessing Message-ID: <605@osiris.UUCP> Date: Thu, 21-Nov-85 11:06:39 EST Article-I.D.: osiris.605 Posted: Thu Nov 21 11:06:39 1985 Date-Received: Sat, 23-Nov-85 10:23:38 EST Distribution: na Organization: Johns Hopkins Hospital Lines: 34 I'm looking for a way to do partial preprocessing of C programs. What I'm talking about is selectively #defining one (or more) preprocessor variables or macros in the source code and expanding it (them) while leaving all others untouched. I want any occurrences of the variables or macros in the source code (and particularly #if/#ifdef code) to be expanded. Is there a way to do this using cpp that I've been missing? If not, could m4 do something like this? (It would have to imitate the Reiser cpp to perform correctly, so I have my doubts about m4...) If none of the preprocessors can handle it, is there a program anywhere which implements this function? We have something here on our Pyramid called 'unifdef', which is located in /usr/ucb and seems to be from Berkeley (according to the sccs header). I can't find any documentation on it, though. If this *is* an official BSD distribution-type command, could somebody please explain to me how it works (or at least what it does) - I don't really have the time to figure it out empirically. If I get no leads from this posting, I may well write something like this myself (whenever I manage to find the time!!). If I do, would anybody else out there be interested in a copy? Phil Kos "Woo!" The Johns Hopkins Hospital - Trent Phlooog Baltimore, MD ...!gamma!cp1 v ...!decvax!decuac -> !aplvax!osiris!phil <- ...!unc!brl-bmd ^ ...!allegra!umcp-cs