Sunifdef

Sunifdef is a command line tool for simplifying the preprocessor conditionals in C/C++ source code.
Download

Sunifdef Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Mike Kinghan
  • Publisher web site:
  • http://www.sunifdef.strudl.org/

Sunifdef Tags


Sunifdef Description

Sunifdef is a command line tool for simplifying the preprocessor conditionals in C/C++ source code. Sunifdef is a command line tool for simplifying the preprocessor conditionals in C/C++ source code (#if and related directives) based on the the user's chosen interpretation of the preprocessor symbols.Sunifdef 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.Installation:Download the tarball to a location under your home directoryExtract the directory sunifdef from the tarball. Do not rename it.To install from source:Open a command console and cd into the sunifdef directoryRun ./configureIf all is well, run makeIf all is well, run su and enter the root password when prompted (to become root).Run make installTo install the pre-built executable:As root, copy built-bin/sunfidef from the sunifdef directory into /usr/local/bin.Set permissions on /usr/local/bin/sunifdef to make it executable. As root, copy man/sunifdef.1 from the sunifdef directory into /usr/local/man/man1To test that Sunifdef is installed:Run sunifdef -v, and expect output like: sunifdef, version 0.1.3 (built Feb 22 2006, 19:47:48) sunifdef: Completed, exit code 0x0000Run man sunifdef, and expect to see the sunifdef man page.What's New in This Release:· 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.


Sunifdef Related Software