Not quite sure which the primary category should be. If devel/ wasn't
chock-full of libraries I'd definitely put it there, but as it is, maybe
textproc/ makes it easier to find... any suggestions? any OKs to import?
-
The unifdef utility selectively processes conditional cpp(1) directives.
It removes from a file both the directives and any additional text that
they specify should be removed, while otherwise leaving the file alone.
It is useful for avoiding distractions when studying code that uses
#ifdef heavily for portability (the original motivation was xterm's pty
handling code), or as a lightweight preprocessor to strip out internal
routines from a public header.
It understands a commonly-used subset of the expression syntax for #if
and #elif lines: integer constants, integer values of symbols defined on
the command line, the defined() operator, the operators !, , , =, =,
==, !=, , ||, and parenthesized expressions.
The unifdef utility understands just enough about C to know when one of
the directives is inactive because it is inside a comment, or affected by
a backslash-continued line. It spots unusually-formatted preprocessor
directives and knows when the layout is too odd for it to handle.
-
unifdef.tgz
Description: application/tar-gz