annotate CODING @ 524:7659ccaf2a74

Document the Geeqie coding style. This is a draft, please improve.
author zas_
date Fri, 25 Apr 2008 09:28:45 +0000
parents
children 86f4c42afeab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
524
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
1 Please keep the general coding style of Geeqie:
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
2
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
3 Space after if, while and for:
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
4
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
5 while (...)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
6 for (...)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
7 if (...)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
8
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
9 Indentation of {}:
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
10
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
11 while (...)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
12 {
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
13 ...
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
14 }
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
15
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
16 if (...)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
17 {
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
18 ...
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
19 }
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
20 else
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
21 {
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
22 ...
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
23 }
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
24
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
25 Spaces around operators:
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
26
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
27 i = 2;
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
28
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
29 Space after comma:
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
30 func(a, b, c);
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
31
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
32 Use glib functions when possible (ie. g_ascii_isspace() instead of isspace()).
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
33 Please use glib types when possible (ie. gint and gchar instead of int and char)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
34 .
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
35
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
36 Check twice the indentation and spurious whitespaces.
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
37