[Tinyos-beta-commits] CVS: tinyos-1.x/beta/teps/html tep3.html, 1.4, 1.5

Ion ion- at users.sourceforge.net
Thu Mar 24 13:39:24 PST 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/teps/html
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7146/html

Modified Files:
	tep3.html 
Log Message:
Update to take into account new nesC rules for macro scoping and 
deprecation of 'includes'.


Index: tep3.html
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/teps/html/tep3.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** tep3.html	24 Mar 2005 21:22:55 -0000	1.4
--- tep3.html	24 Mar 2005 21:39:21 -0000	1.5
***************
*** 301,307 ****
  <tr class="field"><th class="docinfo-name">Draft-Created:</th><td class="field-body">31-Dec-2004</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Version:</th><td class="field-body">1.7</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Modified:</th><td class="field-body">2005-02-26</td>
  </tr>
  <tr class="field"><th class="docinfo-name">Draft-Discuss:</th><td class="field-body">TinyOS Developer List &lt;tinyos-devel at mail.millennium.berkeley.edu&gt;</td>
--- 301,307 ----
  <tr class="field"><th class="docinfo-name">Draft-Created:</th><td class="field-body">31-Dec-2004</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Version:</th><td class="field-body">1.8</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Modified:</th><td class="field-body">2005-03-24</td>
  </tr>
  <tr class="field"><th class="docinfo-name">Draft-Discuss:</th><td class="field-body">TinyOS Developer List &lt;tinyos-devel at mail.millennium.berkeley.edu&gt;</td>
***************
*** 332,336 ****
  <li><a class="reference" href="#names" id="id17" name="id17">4.1.1&nbsp;&nbsp;&nbsp;Names</a></li>
  <li><a class="reference" href="#id5" id="id18" name="id18">4.1.2&nbsp;&nbsp;&nbsp;Packages</a></li>
! <li><a class="reference" href="#extra" id="id19" name="id19">4.1.3&nbsp;&nbsp;&nbsp;Extra</a></li>
  </ul>
  </li>
--- 332,336 ----
  <li><a class="reference" href="#names" id="id17" name="id17">4.1.1&nbsp;&nbsp;&nbsp;Names</a></li>
  <li><a class="reference" href="#id5" id="id18" name="id18">4.1.2&nbsp;&nbsp;&nbsp;Packages</a></li>
! <li><a class="reference" href="#preprocessor" id="id19" name="id19">4.1.3&nbsp;&nbsp;&nbsp;Preprocessor</a></li>
  </ul>
  </li>
***************
*** 543,555 ****
  </blockquote>
  </div>
! <div class="section" id="extra">
! <h3><a class="toc-backref" href="#id19" name="extra">4.1.3&nbsp;&nbsp;&nbsp;Extra</a></h3>
  <blockquote>
  <ul class="simple">
! <li>Don't use <cite>#include</cite> in <cite>.nc</cite> files.  Use the nesC <cite>includes</cite>
! statement instead.</li>
! <li>Don't declare macros in <cite>.nc</cite> files.  Put them in an associated C
! header file.</li>
! <li><cite>#define</cite> should only be used where <cite>enum</cite> and <cite>inline</cite> do not suffice.<ul>
  <li>Arguments to <cite>unique()</cite> should be <cite>#define</cite> string constants rather
  than strings.  This minimizes nasty bugs from typos the compiler
--- 543,558 ----
  </blockquote>
  </div>
! <div class="section" id="preprocessor">
! <h3><a class="toc-backref" href="#id19" name="preprocessor">4.1.3&nbsp;&nbsp;&nbsp;Preprocessor</a></h3>
  <blockquote>
  <ul class="simple">
! <li>Don't use the nesC <cite>includes</cite> statement.  It does not handle macro
! inclusion properly.  Use <cite>#include</cite> instead.</li>
! <li>Macros declared in an <cite>.nc</cite> file must be <cite>#define</cite>'d within
! a <cite>module</cite> definition to actually limit their scope to the module.</li>
! <li>Macros which are meant for use in multiple <cite>.nc</cite> files should be
! <cite>#define</cite>'d in an associated C header.</li>
! <li>Use of macros should be minimized:
! <cite>#define</cite> should only be used where <cite>enum</cite> and <cite>inline</cite> do not suffice.<ul>
  <li>Arguments to <cite>unique()</cite> should be <cite>#define</cite> string constants rather
  than strings.  This minimizes nasty bugs from typos the compiler



More information about the Tinyos-beta-commits mailing list