[Tinyos-beta-commits] CVS: tinyos-1.x/beta/teps/txt tep3.txt, 1.8, 1.9

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


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

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


Index: tep3.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/teps/txt/tep3.txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** tep3.txt	24 Mar 2005 21:22:54 -0000	1.8
--- tep3.txt	24 Mar 2005 21:39:21 -0000	1.9
***************
*** 185,196 ****
        as only one of them will be used.
  
! Extra
! .....
  
!   - Don't use `#include` in `.nc` files.  Use the nesC `includes`
!     statement instead.
!   - Don't declare macros in `.nc` files.  Put them in an associated C
!     header file.
!   - `#define` should only be used where `enum` and `inline` do not suffice.
  
      - Arguments to `unique()` should be `#define` string constants rather
--- 185,199 ----
        as only one of them will be used.
  
! Preprocessor
! ............
  
!   - Don't use the nesC `includes` statement.  It does not handle macro
!     inclusion properly.  Use `#include` instead.
!   - Macros declared in an `.nc` file must be `#define`'d within
!     a `module` definition to actually limit their scope to the module.
!   - Macros which are meant for use in multiple `.nc` files should be
!     `#define`'d in an associated C header.
!   - Use of macros should be minimized:
!     `#define` should only be used where `enum` and `inline` do not suffice.
  
      - Arguments to `unique()` should be `#define` string constants rather
***************
*** 226,237 ****
    - Functions should be lower case, words separated by underscores,
      prefixed by package.
!   - Function macros should be all upper case, words separated by
!     underscores, prefixed by package.
  
!     - Use of function macros is discouraged: use inline functions.
    - Constants should be all upper case, words separated by underscores,
      prefixed by package.
      
!     - Use of `#define` numeric constants is discouraged: use `enum`.
      - Do use `#define` for string constants.
    - Global variables should be mixed case, starting lower case.
--- 229,240 ----
    - Functions should be lower case, words separated by underscores,
      prefixed by package.
!   - Function macros (`#define`s) should be all upper case, words separated
!     by underscores, prefixed by package.
  
!     - Use of function macros is discouraged: use `inline` functions.
    - Constants should be all upper case, words separated by underscores,
      prefixed by package.
      
!     - Use of `#define` for numeric constants is discouraged: use `enum`.
      - Do use `#define` for string constants.
    - Global variables should be mixed case, starting lower case.



More information about the Tinyos-beta-commits mailing list