/* Random notes (and quotes :-) on my very own C programming style. --Ernst */

/*--------------------------------------------------------------------------*/

/*                          "It's simply a matter of style, and while there
                            are many wrong styles, there really  isn't  any
                            one right style."            -- Ray Butterworth */

/*--------------------------------------------------------------------------*/

/* IDETIFERS: lowercase with underscores
   EXCEPTION: types and macros (esp, when evaluating parameters twice!) 
              start with capital letter */

/* BASIC TYPES: float, double, int (and, if necessary: short, long) */

/*--------------------------------------------------------------------------*/

/* FUNCTIONS HEADERS look like this: */

type function (a, b, c, ...)
     type1 a,b;
     type2 c;  /* output */
     ...;
{
}

/*--------------------------------------------------------------------------*/

/* ad FUNCTION VARIABLES: */

/* According to the C book function variables are declared like, eg, */

void (* hook) ();

/* and should be called like, eg, */

...;
(* hook) (...);
...;

/* however, for convenience I call them like a "normal" function, eg, */

hook (...);

/* and it works. */

/*--------------------------------------------------------------------------*/

/* STATMENTS are formated like: */

{
  if (condition)
    {
      then_part ();
    }
  else
    {
      else_part ();
    }
  while (condition)
    {
      body ();
    }
  etc;
}

/* but short forms (w/o blocks) are fine, too: */

{
  if (condition) procedure ();
  while (condition) body ();
}

/*--------------------------------------------------------------------------*/

/*   The 8th Commandment for C Programmers               by Henry Spencer
     8.  Thou shalt make thy program's purpose and structure clear to thy
     fellow man by using the One True Brace Style, even if thou likest it
     not,  for  thy creativity is better used in solving problems than in
     creating beautiful new impediments to understanding.                   */

/*--------------------------------------------------------------------------*/
