HACKING 932 Bytes
Newer Older
Jorn Baayen's avatar
Jorn Baayen committed
1
2
3
4
In order to keep the code nice and clean we have a few requirements you'll
need to stick to in order to get your patch accepted:

- use 8-space tabs for indentation
5
6
- curly brackets are NOT on a new line, except for function definitions.
  (we are slowly converting the code)
7
8
9
10
- if statements are written like this: "if (this != that)"
- g_list_next/previous is preferred to list->next or list->previous
- every function should have a prototype
- callback functions have a suffix _cb
11

12
13
14
15
16
17
18
  Important comment blocks are written like this:
  
/**
 * bla_bla_cb: This is an example comment block
 */

  Here is a correctly indented code sample:
19
20
21
22
23
24
25
26
27
28
29
30

void
foo (const char *bla, gpointer cow)
{
	if (!strcmp (bla, cow)) {
		g_print ("moo!");
		return;
	}

	...
}	

Colin Walters's avatar
Colin Walters committed
31
32
33
You may commit small, obvious fixes to this module.  Anything larger
should be run by Colin Walters <walters@debian.org>, unless you
know I've given you blanket commit permission.