Remove ifdef'ed C/C++ lines
Syntax:
unifdef [-l] [-t] [-c] [[-Dsym] [-Usym] [-iDsym] [-iUsym]]... [file]
Options:
- -Dsym
-Usym
- Specify which symbols to define or undefine respectively.
The lines inside those ifdefs are copied to the output
or removed as appropriate.
The ifdef, ifndef, else, and
endif lines associated with sym are also removed.
If an ifdef X occurs nested inside another
ifdef X, then the inside ifdef is treated as
if it were an unrecognized symbol.
- -c
- Cause the operation to be complemented (i.e., the lines that would
have been removed or blanked are retained and vice versa).
- -l
- Replace removed lines with blank lines instead of deleting them.
- -t
- Disable parsing for C/C++ comments and quotes, which is useful for plain text.
- -iDsym
- -iUsym
- Ignore the specified ifdefs.
Specifies which ifdef symbols to parse or
not to parse for quotes and comments inside respectively.
Parsing is done by default, and the -t option overrides
these options.
Description:
The unifdef utility removes ifdef'ed lines from C or
C++ code.
You must specify at least one of -D, -U,
-iD, and -iU.
This utility copies output to stdout, and takes its input from
stdin if you don't specify a file argument.