1 GPL header, in every file, like this:
3 /** @file relativ/path/with/this/file/name.c
4 * Short description of this file.
8 * Optionaly detailed description of this file
13 * This file is a part of Geeqie project (http://geeqie.sourceforge.net/).
14 * Copyright (C) 2008 Geeqie team
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
27 --------------------------------------------------------------------------------
31 Use whole sentences begins with Capital letter. For each modification use new line.
32 Or you can write the theme, colon and then every change on new line, begin
39 - I change the interface
40 - added some new functions
42 --------------------------------------------------------------------------------
47 Names of variables & functions: small_letters
48 of defines: CAPITAL_LETTERS
50 Try to use explicit variable and function names.
53 Try not to use macros.
54 Use EITHER "struct foo" OR "foo"; never both
71 if (<cond_very_very_very_very_very_very_very_very_very_long> &&
72 <cond2very_very_very_very_very_very_very_very_very_long)
85 for (i = 0; i <= 10; i++)
95 int bar(<var_def>, <var_def>, <var_def>)
101 return 0; // i.e. SUCCESS; if error, you must return minus <err_no>
111 Pragma: (Indentation 2 spaces)
115 # define _(String) (String)
116 #endif /* ENABLE_NLS */
122 --------------------------------------------------------------------------------
124 Use spaces around every operator (except ".", "->", "++" and "--");
125 unary operator '*' and '&' are missing the space from right;
126 (and also unary '-').
127 As you can see above, parentheses are closed to inside, i.e. " (blah blah) "
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
130 it makes your code nicer in being verticaly indented.
132 --------------------------------------------------------------------------------
134 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()).
136 Check if used functions are not deprecated.
138 --------------------------------------------------------------------------------
140 Documentation: use Doxygen