This is simply a collection of notes about coding stuff to maintain consistency.

A good way to maintain consistency is have the editor do the indenting/commenting etc. If you use the right profile code then there are some emacs functions to do this which include:

Indenting

The standard for code has been to indent by two for each block, there seems no reason to change it. Line length should be kept to somewhere between 80 and 90 chars, i.e. something that will fit comfortably on to a screen with a reasonable font size. BUT exceeding this length occasionally is not a problem.

int func(void)
{
  int some_var ;

  if (blah)
    {
      call_something() ;
    }

  return ;
}

Commenting Style

Block comments and line comments should be in this style:


  if (blah)
    {
      /* This is quite a long block
       * comment that runs to more than one
       * line. */
      call_something() ;				    /* unknown function */
    }

Type, Function and variable naming

General naming conventions:

Function names

Its useful to adopt different naming styles for external interface functions, internal interface functions and static functions: