Mercurial > geeqie.yaz
comparison CODING @ 809:83d3abd80b64
Minor fixes and add a note about variable declaration.
author | zas_ |
---|---|
date | Mon, 09 Jun 2008 10:10:34 +0000 |
parents | f20e7cebcb12 |
children | 8b89e3ff286b |
comparison
equal
deleted
inserted
replaced
808:c3fc736fb927 | 809:83d3abd80b64 |
---|---|
32 Or you can write the theme, colon and then every change on new line, begin | 32 Or you can write the theme, colon and then every change on new line, begin |
33 with "- ". | 33 with "- ". |
34 | 34 |
35 Example: | 35 Example: |
36 | 36 |
37 I done some bugfixes. | 37 I did some bugfixes. |
38 Library: | 38 Library: |
39 - I change the interface | 39 - the interface was modified |
40 - added some new functions | 40 - new functions were added |
41 | 41 |
42 -------------------------------------------------------------------------------- | 42 -------------------------------------------------------------------------------- |
43 | 43 |
44 sources: | 44 sources: |
45 | 45 |
90 } | 90 } |
91 | 91 |
92 | 92 |
93 Functions: | 93 Functions: |
94 | 94 |
95 int bar(<var_def>, <var_def>, <var_def>) | 95 gint bar(<var_def>, <var_def>, <var_def>) |
96 { | 96 { |
97 <command>; | 97 <command>; |
98 ... | 98 ... |
99 <command>; | 99 <command>; |
100 | 100 |
126 (and also unary '-'). | 126 (and also unary '-'). |
127 As you can see above, parentheses are closed to inside, i.e. " (blah blah) " | 127 As you can see above, parentheses are closed to inside, i.e. " (blah blah) " |
128 In "function(<var>)" there are no space before '('. | 128 In "function(<var>)" there are no space before '('. |
129 You MAY use more tabs/spaces than you OUGHT TO (according to this CodingStyle), if | 129 You MAY use more tabs/spaces than you OUGHT TO (according to this CodingStyle), if |
130 it makes your code nicer in being verticaly indented. | 130 it makes your code nicer in being verticaly indented. |
131 Variables declarations should be followed by a blank line and should always be | |
132 at the start of the block. | |
131 | 133 |
132 -------------------------------------------------------------------------------- | 134 -------------------------------------------------------------------------------- |
133 | 135 |
134 Use glib types when possible (ie. gint and gchar instead of int and char). | 136 Use glib types when possible (ie. gint and gchar instead of int and char). |
135 Use glib functions when possible (ie. g_ascii_isspace() instead of isspace()). | 137 Use glib functions when possible (ie. g_ascii_isspace() instead of isspace()). |