[m-dev.] coding standard

Bert Thompson aet at cs.mu.oz.au
Wed Feb 12 14:35:06 AEDT 1997


|Something else for the C coding standard:
|
|	All code other than function definitions that is nested inside `#if's
|	or `#ifdef's should be indented two spaces per level of nesting.
|	Use #elif to reduce nesting depth, and use
|		#if defined(FOO) && defined(BLAH)
|		  ...
|		#endif
|	rather than
|		#ifdef FOO
|		   #ifdef BAR
|		     ..
|		   #endif
|		#endif
|
|This makes the code much easier to read and hence gives us a better
|chance of avoiding conditional compilation bugs.

Good move. Consider it added.

I'll make a second pass through the C source for this and some other things.

Bert



More information about the developers mailing list