<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>C# app to count #ifdef usage</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/23/ifdef-usage.aspx</link><description>Here's a little tool I wrote to count #ifdef usage in a project. It provides a summary of the #define name and frequency; plus a detailed XML file of each location that the #define occurred at. For example, when applied to this sample file (in directory</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>#ifdef usage in Rotor</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/23/ifdef-usage.aspx#1454314</link><pubDate>Fri, 12 Jan 2007 10:30:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1454314</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;I ran my #ifdef counter on the Rotor sources. The #ifdefs fall into a few categories: cross-platform,&lt;/p&gt;
</description></item><item><title>re: C# app to count #ifdef usage</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/23/ifdef-usage.aspx#1457263</link><pubDate>Sat, 13 Jan 2007 00:23:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1457263</guid><dc:creator>Ben</dc:creator><description>&lt;p&gt;That sample code isn't even valid... mismatched endifs which I know are illegal, and use of expressions within ifndef which I think is wrong too.&lt;/p&gt;
&lt;p&gt;I'd also have liked to see quickly whether it picks up lines like:&lt;/p&gt;
&lt;p&gt;#if defined(NDEBUG)&lt;/p&gt;
&lt;p&gt;#endif&lt;/p&gt;
&lt;p&gt;The limited flexibility of #ifdef/#ifndef means that &amp;quot;#(el)if defined&amp;quot; gets used a lot (ok, you can do some magic to get boolean combinations using only #ifdef/#else/#endif and #define, but defined() is so much nicer).&lt;/p&gt;</description></item><item><title>re: C# app to count #ifdef usage</title><link>http://blogs.msdn.com/jmstall/archive/2006/12/23/ifdef-usage.aspx#1457281</link><pubDate>Sat, 13 Jan 2007 00:32:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1457281</guid><dc:creator>jmstall</dc:creator><description>&lt;p&gt;Ben - it _does_ pick up tokens used in #if defined, and #elif. &lt;/p&gt;
&lt;p&gt;It does not enforce that the #endifs are well balanced.&lt;/p&gt;
</description></item></channel></rss>