Table of Contents

Guideline

SVN

Please comply with these:

  1. Always write a commit-message (no exception). Write the whole commit-message in exactly 1 line (no linebreaks) and separate - if appropriate - single items with semi-colon ';'.
  2. Try to separate independent changes into several commits. Each coherent change one commit (there might be exceptions)

How to commit?

$ svn diff       # comfortable: svn diff | view -
$ svn status
$ svn status -u
$ svn update
$ svn commit -m'commit message' [<files>]

trac

Creating a new ticket

Closing tickets

About the code

Please comply with these:

  1. Try to be generous and verbose with comments.
  2. Coding style:
    • Use tabs for indention instead of spaces (tab-width = 8 spaces).
    • Curly brackets belong on their own line for statements. (valid for C++; for C-code put curly bracket in same line)
    • No spaces between round brackets and arguments. Arguments are separated by a space behind the comma.
    • Space between statement (e.g. if, while) and the following round bracket, but no space behind a function.
    • Pointer sign belongs to variable name (avoids things like this: int* a, b which in fact means int *a, b).
  3. For new source/header files use the docs/license_stub.txt header as template
  4. Important: Always save with UNIX line-endings (NOT MS-DOS line-endings)

Example code:

if (true)
{
	do_something();    // do something useful
}
else
	do_something(123, arg2, etc);
 
 
int *x, *y;
 
 
float* calc(float a, float b)
{
	return a + b;
}
 
class ExampleClass
{
public:
	ExampleClass();
	void setValue(int value);
	int getValue() const { return value; };
 
private:
	int value;
	int flags;
};
 
void ExampleClass::setValue(int value)
{
	// this-pointer needed if same variable name in current scope
	this->value = value;
 
	// no this-pointer for members
	flags = 0x123;
}
 
 
switch (option)
{
case value1:
	something();
	break;
 
case value2:
	something();
	break;
 
default:
	something_other();
}