Changes between Version 4 and Version 5 of CodingGuidelines


Ignore:
Timestamp:
11/02/10 18:03:49 (6 years ago)
Author:
takkaria
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodingGuidelines

    v4 v5  
    22 
    33Rules: 
    4 * K&R brace style, with four spaces per indent 
     4* K&R brace style, with tabs of four spaces 
    55* Avoid lines over 80 characters long (not strict if there are multiple indents, but ideally they should be refactored) 
    66* If a function takes no parameters, it should be declared as function(void), not just as function(). 
     
    99* Use enums where possible instead of defines, and never use magic numbers. 
    1010* Don't use floating point. 
    11 * Code should compile as C89 and not rely on undefined behaviour. 
     11* Code should compile as C89 with C99 int types, and not rely on undefined behaviour. 
    1212* Don't use the C built-in string functions, use the my_ versions instead (strcpy -> my_strcpy, sprintf -> strnfmt()).  They are safer. 
    1313