This is an old Unix utility, OpenBSD versions <=5.5 shipped with a much older version from CSRG times. It was recently updated to the rewrite done by Tony Finch.
The first known use of the term "refactoring" in the published literature was in a September, 1990 article by William Opdyke and Ralph Johnson - "Refactoring: An Aid in Designing Application Frameworks and Evolving Object-Oriented Systems". Proceedings of the Symposium on Object Oriented Programming Emphasizing Practical Applications (SOOPPA). ACM.
Super useful tool once you realize that you need it. I used it extensively with the QEMU sources where all the supported architectures are essentially just ifdefs in the code. There is also an improved `sunifdef` flying around in the interwebs.
I wish more manpages would include a brief explanation of why you might want to use the tool. For someone stumbling across this utility, the documentation is baffling.
Trim unused code paths from ancient C code, usually work-arounds and legacy platform support. Or trim large accumulations of #if 0 that similarly build up in old C code bases.
8 comments
[ 4.4 ms ] story [ 30.5 ms ] threadhttp://dotat.at/prog/unifdef/