summaryrefslogtreecommitdiff
path: root/CodingStyle
blob: abd423184300d579d9402a400453cb2520a274ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
== Indent ==

Use "indent -kr -i8 -pcs -lp -lps -psl *.c" to convert to "mostly correct"
indenting levels.

== Tabs ==

Tabs are the size of 8 spaces, and should be used in preference to spaces.

== Overlong lines ==

Functions that are too long for one line are indented with tabs and then
spaces to the start of the bracket:

libnotify_event ("HAL does not have PowerManagement capability",
		 LIBNOTIFY_URGENCY_CRITICAL, NULL);

== Braces ==

Functions have curly brace on same line:

if (icon == NULL) {
	g_warning ("Cannot find icon");
	return FALSE;
}

Braces not-ommitted for single line:

if (!false) {
	g_warning ("Cannot find icon");
}