HACKING 928 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
7
8
9
10
11
12
13
14
15
16
17
18
19
20
- curly brackets are NOT on a new line, except for function definitions.
  (we are slowly converting the code)

  Here is a correctly indented sample:

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

	...
}	

Jorn Baayen's avatar
Jorn Baayen committed
21
22
23
- 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
Olivier Martin's avatar
Olivier Martin committed
24
- callback functions have a suffix _cb
Jorn Baayen's avatar
Jorn Baayen committed
25

Colin Walters's avatar
Colin Walters committed
26
  Important comment blocks are written like this:
Jorn Baayen's avatar
Jorn Baayen committed
27
28
29
30
31
  
/**
 * bla_bla_cb: This is an example comment block
 */

Colin Walters's avatar
Colin Walters committed
32
33
34
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.