News for hackers. Stuff that matters.
Re:Unifdef – remove preprocessor conditionals from code by brynet on Wednesday March 18, 2015 @12:15PM (#9226528)
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.

http://dotat.at/prog/unifdef/

Re:Unifdef – remove preprocessor conditionals from code by __michaelg on Wednesday March 18, 2015 @01:30PM (#9227175)
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.
Re:Unifdef – remove preprocessor conditionals from code by lomnakkus on Wednesday March 18, 2015 @01:44PM (#9227284)
Yup, I've also used it (the old version, I guess) to great effect to clean up a legacy code base which had defines for things like Amiga and VMS...
Re:Unifdef – remove preprocessor conditionals from code by jradix on Wednesday March 18, 2015 @12:39PM (#9226733)
A refactoring tool from the days where "refactoring" didn't exist
Re:Unifdef – remove preprocessor conditionals from code by cssmoo on Wednesday March 18, 2015 @01:31PM (#9227182)
Refactoring always existed. We just didn't have a name for it and it was done by us meat popsicles.
Re:Unifdef – remove preprocessor conditionals from code by SixSigma on Wednesday March 18, 2015 @03:40PM (#9228139)
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.
Re:Unifdef – remove preprocessor conditionals from code by joosters on Wednesday March 18, 2015 @02:56PM (#9227869)
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.
Re:Unifdef – remove preprocessor conditionals from code by acveilleux on Wednesday March 18, 2015 @05:23PM (#9228792)
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.