The 4th major release of sunifdef is relaunched as coan - C/C++ configuration analyser. Get it on sourceforge at http://sourceforge.net/projects/coan2
There will be no new development or bug-fixing on this project. Outstanding and new bugs reported against sunifdef will be fixed in coan.
Six bugs are fixed in this release. Five of these fixes tackle longstanding defects of sunifdef's parsing and evaluation of integer constants - a niche that has received little scrutiny since the tool branched from unifdef. This version provides robust parsing of hex, decimal and octal numerals and arithmetic on them, plus safe integer overflow handling. However, sunifdef still evaluates all integer constants as ints and performs signed integer arithmetic upon them. This still falls short of emulating the C preprocessor's arithmetic fully, which is an unfixed defect.
This is a maintenance release fixing 5 minor bugs.
The parser is strengthened to cope with contexts that were formerly skipped over as "obfuscated". The --obfusc option is withdrawn as it is now redundant.
Six bugs are fixed. The demise of the Sourceforge compile farm means that many platforms can no longer be tested for this release.
A new --recurse option enables recursive traversal of source directories. Users need to longer write driver scripts for this routinely required capablity. A new --filter option enables selection of input files by file-extension. A new --keepgoing option causes processing to carry on with subsequent input files following parse errors. The --verbose mode now emits progress messages. The Unix and Windows builds now accept both sorts of line ends. Hex and octal preprocessor constants are now parsed. Six bugs are fixed. An extensive EXAMPLES section has been added to man page.
Two errors in compiling to the C89 standard are fixed, as are warnings provoked by "warn_unused_result" declarations and by building to 64-bit.
v2.1.1 is the first release of Sunifdef on SourceForge.net.
Sunifdef is a commandline tool for simplifying the preprocessor conditionals in C and C++ source files (#if and related directives) based on the the user's stipulation of the preprocessor macros that shall be defined or undefined. 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.... read more