Projects / Sunifdef

Sunifdef

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
Licenses BSD Revised
Operating Systems Unix Windows Windows
Implementation C

Tweet this project Short link

Rss Recent releases

  • Rrelease-mid
  •  04 Feb 2008 13:59
  • Rrelease-after

Changes: 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.

  • Rrelease-mid
  •  24 Nov 2007 03:10
  • Rrelease-after

Changes: Five minor bugs were fixed.

Changes: 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.

Changes: 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.

  • Rrelease-mid
  •  22 Jul 2006 13:49
  • Rrelease-after

Changes: 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.

No-screenshot

Project Spotlight

geoipgen

An IP network tool for generating geotargeted lists of IP addresses.

No-screenshot

Project Spotlight

Methanol

A Web crawling system.