<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: preprocessor directives in macros in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/preprocessor-directives-in-macros/m-p/205371#M7897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Your guess is as good as mine, bigmac. And you're indeed right -- tough to understand their code this way! I finally gave up trying and just did a find-n-replace in all their source, dumped the macros, and went about my business. With those preceding underscores, I was thinking it was some sort of directive use which through me. Like a bizarre compiler trick or something. Thanks for the help.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jun 2010 20:48:17 GMT</pubDate>
    <dc:creator>irob</dc:creator>
    <dc:date>2010-06-07T20:48:17Z</dc:date>
    <item>
      <title>preprocessor directives in macros</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/preprocessor-directives-in-macros/m-p/205369#M7895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, everyone. I'm reaching my limit of C language understanding with this question. I've got some sample code written by Freescale, as part of one of their demo boards, the DEMO9S08AW60E. There are the following macros in one of the header files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define _DEBUGT(a)&amp;nbsp;&amp;nbsp; Debugt(a)&amp;nbsp;&amp;nbsp;&amp;nbsp; #define _DEBUGI(a)&amp;nbsp;&amp;nbsp; Debugi(a)&amp;nbsp;&amp;nbsp;&amp;nbsp; #define _DEBUGC(a)&amp;nbsp;&amp;nbsp; Debugc(a)&amp;nbsp;&amp;nbsp;&amp;nbsp; #define _DEBUGNL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debugnl()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is, what is the point of making such a subsitution of function names for what looks like preprocessor directive names?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jun 2010 03:22:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/preprocessor-directives-in-macros/m-p/205369#M7895</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2010-06-05T03:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: preprocessor directives in macros</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/preprocessor-directives-in-macros/m-p/205370#M7896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello irob,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In all probability the real macros were named with&amp;nbsp;upper case and&amp;nbsp;underscore, but one or more files used the same macros, but&amp;nbsp;with the alternative naming.&amp;nbsp; The use of the header file would avoid the need to&amp;nbsp;change every instance of&amp;nbsp;the macro use within these files, or create a second set of macros with the different naming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This practice is obviously not helpful in the understanding of the code operation, probably requiring the knowledge of the contents of two header files instead of one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jun 2010 11:44:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/preprocessor-directives-in-macros/m-p/205370#M7896</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-06-05T11:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: preprocessor directives in macros</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/preprocessor-directives-in-macros/m-p/205371#M7897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Your guess is as good as mine, bigmac. And you're indeed right -- tough to understand their code this way! I finally gave up trying and just did a find-n-replace in all their source, dumped the macros, and went about my business. With those preceding underscores, I was thinking it was some sort of directive use which through me. Like a bizarre compiler trick or something. Thanks for the help.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jun 2010 20:48:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/preprocessor-directives-in-macros/m-p/205371#M7897</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2010-06-07T20:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: preprocessor directives in macros</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/preprocessor-directives-in-macros/m-p/205372#M7898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello irob,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For&amp;nbsp;C coding, keep in mind that the preprocessor handles the macros by simply providing text substitution, with the possibility of multiple substitutions if macros are included within macros.&amp;nbsp; You can always determine what final substitutions have been made by running the preprocessor alone for the project.&amp;nbsp; This can be a very useful debug tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jun 2010 21:15:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/preprocessor-directives-in-macros/m-p/205372#M7898</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-06-07T21:15:41Z</dc:date>
    </item>
  </channel>
</rss>

