I thought it was about time to lose a few words about coding my rules for
contributions to this project. I started it, I wrote more than 90% of the
code and so I feel obliged to define the rules.

I ask anyone who contributes to the source code to please follow the
guidelines. Discussing the style is not necessary, because I won't change it.

= Tab stops
=========
A tab stop is historically 8 blanks wide. However, because some level
of nesting is unavoidable, I did chose a tab stop width of 4 characters.
Set your .exrc or .vimrc for vi or vim to
set tabstop=4
or configure whatever editor you use to use "hard tabs" with a width
of 4 characters.

= Blanks
=========
There are usually no blanks on code lines, specificially abovementioned
4 blanks indentation is not achieved by using 8 blanks wide tab stops
and filling in 4 blanks, but rather by chaning the tab stop width to 4.

- Lining up if/else and the like
I write the opening braces on the end of the if, and use the "cuddle else"
style, i.e. put previous block's closing brace, else and opening brace on
the same line. Closing braces are on the level of the corresponding if or
whatever keyword was before the opening block. Some examples:

if (0 == foo) {
	bar(0);
	while (--i > 0)
		baz(i);
} else {
	bar(2);
	bam(1);
}

= Constants first in conditional expressions
=========
I usually write the constant (0, NULL, '\0' etc.) first in if expressions.
This may look awkward at a first glance, while it helps avoiding bugs.
Some compilers don't warn if you make assignments in if expressions, and
writing the constant first would always result in an error if you wrote
	if (0 = var)
instead of what you most probably meant to write
	if (0 == var)
If you write
	if (var = 0)
this is no reason to complain for some compilers.

= Comments
=========
I prefer old style C comments, and usuallly don't have C99 or C++ // comments.
For multi line comments I prefer the leading asterisk on all lines but only
one comment, i.e.:
/*******************
 * my preferred
 * comment style
 *******************/
Your mileage may differ. However, if I touch your code again, I will
rigorously change comments (if any) to meet my style ;)

That's all for now. Looking at the source will give you more hints about
the type of contributions that won't be rejected just because of their
formatting.

