Sunifdef is a command line 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.
|Tags||Software Development Build Tools Pre-processors|
|Operating Systems||Unix Windows Windows|
Release Notes: 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. However, sunifdef still evaluates all integer constants as ints and performs signed integer arithmetic upon them. This falls short of emulating the C preprocessor's arithmetic in limit cases, which is an unfixed defect.
Release Notes: Five minor bugs were fixed.
Release Notes: The parser is strengthened to cope with contexts that were formerly skipped over as "obfuscated". The --obfusc option is thus redundant and is withdrawn. Six bugs are fixed. The demise of the Sourceforge compile farm means that many platforms can no longer be tested for this release.
Release Notes: A new --recurse option enables recursive traversal of source directories. Users no longer need to 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 endings. Hex and octal preprocessor constants are now parsed. Six bugs were fixed. An extensive EXAMPLES section has been added to the man page.
Release Notes: Two errors when compiling to the C89 standard were fixed, as were warnings provoked by "warn_unused_result" declarations and by building to 64-bit.