Sunifdef ("Son of Unifdef")
Sunifdef is a commandline tool for eliminating superfluous preprocessor clutter from C and C++ source files. It is a more powerful successor to the FreeBSD 'unifdef' tool.
Sunifdef is most useful to developers of constantly evolving products with large code bases, where preprocessor conditionals are used to configure the feature sets, APIs or implementations of different releases. In these environments the code base steadily accumulates #ifdef pollution as transient configuration options become obselete. Sunifdef can largely automate the recurrent task of purging redundant #if logic from the code.
- 2008-01-23 Sunifdef v3.1.3 (stable)
Six bugs are fixed - see the Changelog page. Five of these fixes address defects of sunifdef's parsing and evaluation of integer constants. Hitherto sunifdef has parsed hex numerals only "by good luck" and has not distinguished octal from decimal numerals. Integer overflow in numerals was not caught. This version properly distinguishes hex, octal and decimal numerals and applies a safe overflow policy (leave the numeral unresolved and emit a warning) when a numeral's value will exceed INT_MAX. This policy falls short of emulating the C preprocessor's arithmetic in limit cases, which is a recognised defect.
- Linux x86/x86_64/PPC
- Windows 2000/XP/Vista x86/x86_64
There is a good chance that Sunifdef will build from source on a system that provides the GNU build tools and Perl.
- The author and maintainer of Sunifdef is Mike Kinghan, Senior Software Engineer at Symbian Software Ltd. Some fundamental elements of Sunifdef are derived from Tony Finch's version of Unifdef.
- Sunidef is copyright © 2004 - 2006 Symbian Software Ltd., © 2007 - 2008 Mike Kinghan, except where otherwise asserted by copyright notices within the source files. Some source files that vitally depend on cribs from the work of Tony Finch retain his copyright notice.
- Sunidef is derived from BSD licensed code and is released under the New BSD License.
Copyright © 2008 Michael Kinghan
Generated on Mon Feb 4 19:26:14 2008 for Sunifdef Home by
1.5.4 (with a little help from perl.)