A useful tool for removing #ifdef'ed lines from a file http://dotat.at/prog/unifdef/
Go to file
2024-01-05 18:49:16 +01:00
README.md automatic update by autodist [release 2.10-1mamba;Tue Feb 18 2014] 2024-01-05 18:49:16 +01:00
unifdef.spec automatic version update by autodist [release 2.12-1mamba;Thu Mar 12 2020] 2024-01-05 18:49:16 +01:00

unifdef

Unifdef is useful for removing #ifdef'ed lines from a file while otherwise leaving the file alone. You specify which symbols are defined or undefined with -D and -U flags, and unifdef removes the corresponding ifdefs, and the enclosed code if appropriate. It's especially useful for removing those "#ifdef BROKEN" and "#ifdef PRIVATE" clauses from code before you release it. Unifdef acts on #ifdef, #ifndef, #else, and #en­ dif lines, and it knows only enough about C and C++ to know when one of these is inactive because it is inside a comment, or a single or double quote.