poe@kos.rci.dk (Poul Oestergaard) (10/11/90)
Does anyone have c sources, or a script, for a cpp preprocessor (cppp) which can remove "ifdef"'s (and "if defined") and the code surrounded by "ifdef" and "else" or "endif"? E. g. the command cppp -RKERNEL <source files> should remove all "ifdef/ifndef KERNEL"'s and source selected by "ifdef/ifndef KERNEL". Output should appear on standard output. Regards Poul Oestergaard RC International Denmark Mail: poe@rci.dk
brnstnd@kramden.acf.nyu.edu (Dan Bernstein) (10/12/90)
In article <1044@kos.rci.dk> poe@kos.rci.dk (Poul Oestergaard) writes: > Does anyone have c sources, or a script, for a cpp preprocessor (cppp) > which can remove "ifdef"'s (and "if defined") and the code surrounded > by "ifdef" and "else" or "endif"? E. g. the command > cppp -RKERNEL <source files> > should remove all "ifdef/ifndef KERNEL"'s and source selected by > "ifdef/ifndef KERNEL". Output should appear on standard output. That's what unifdef does. I don't know unifdef's pedigree. If it's BSD only, the sources might have been freed. ---Dan
emv@math.lsa.umich.edu (Edward Vielmetti) (10/13/90)
In article <10169:Oct1212:34:2790@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: In article <1044@kos.rci.dk> poe@kos.rci.dk (Poul Oestergaard) writes: > Does anyone have c sources, or a script, for a cpp preprocessor (cppp) > which can remove "ifdef"'s (and "if defined") and the code surrounded > by "ifdef" and "else" or "endif"? E. g. the command > cppp -RKERNEL <source files> > should remove all "ifdef/ifndef KERNEL"'s and source selected by > "ifdef/ifndef KERNEL". Output should appear on standard output. That's what unifdef does. I don't know unifdef's pedigree. If it's BSD only, the sources might have been freed. The BSD 4.3 Reno annoucement from comp.bugs.ucb-fixes on 06 July 1990 identifies portions of the 4.3 Reno distribution which are freely redistributable under the standard BSD "freed files" copyright. unifdef(1) is one of the files listed, with the credit going to Dave Yost. I don't know if unifdef was broken out in the earlier release, and as far as I know there was not been a "freed files" release of the Reno code. --Ed Edward Vielmetti, U of Michigan math dept <emv@math.lsa.umich.edu> moderator, comp.archives