Mercurial > geeqie
annotate CODING @ 641:81441380d3be
When an option was successfully read, just continue to next line.
author | zas_ |
---|---|
date | Mon, 12 May 2008 10:46:23 +0000 |
parents | f31ae0d9e163 |
children | f20e7cebcb12 |
rev | line source |
---|---|
524 | 1 Please keep the general coding style of Geeqie: |
2 | |
3 Space after if, while and for: | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
4 ------------------------------ |
524 | 5 |
6 while (...) | |
7 for (...) | |
8 if (...) | |
9 | |
10 Indentation of {}: | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
11 ------------------ |
524 | 12 |
13 while (...) | |
14 { | |
15 ... | |
16 } | |
17 | |
18 if (...) | |
19 { | |
20 ... | |
21 } | |
22 else | |
23 { | |
24 ... | |
25 } | |
26 | |
27 Spaces around operators: | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
28 ------------------------ |
524 | 29 |
30 i = 2; | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
31 x = i * (j / 2); |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
32 |
524 | 33 |
34 Space after comma: | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
35 ------------------ |
524 | 36 func(a, b, c); |
37 | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
38 Functions without any parameter should be declared using void: |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
39 -------------------------------------------------------------- |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
40 gint function(void) |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
41 { |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
42 ... |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
43 } |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
44 |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
45 Use glib types: |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
46 --------------- |
524 | 47 Please use glib types when possible (ie. gint and gchar instead of int and char) |
48 . | |
49 | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
50 Use glib functions: |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
51 ------------------- |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
52 Use glib functions when possible (ie. g_ascii_isspace() instead of isspace()). |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
53 Check if used functions are not deprecated. |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
54 |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
55 Others: |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
56 ------- |
524 | 57 Check twice the indentation and spurious whitespaces. |
58 | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
59 Try to use explicit variable and function names. |