1 Guidelines for Contributing:
3 1) Platform-specific functionality (for example, location of binaries that
4 NetworkManager calls, or functionality used only on some platforms or
5 distribution, like resolvconf) should be configurable at build time, with the
6 normal autoconf mechanisms for putting a #define in config.h (AC_DEFINE), then
7 with #ifdef MY_DEFINE / #endif in the code.
9 2) Coding standards are generally GNOME coding standards, with these exceptions:
10 a) 4 space tabs (_not_ 8-space tabs)
11 b) REAL tabs (_not_ a mix of tabs and spaces in the initial indent)
12 c) spaces used to align continuation lines past the indent point of the
13 first statement line, like so:
15 if (some_really_really_long_variable_name &&
16 another_really_really_long_variable_name) {
20 * Keep a space between the function name and the opening '('.
25 GOOD: f(x); /* comment */
28 * Keep assignments in the variable declaration area pretty short.
29 GOOD: MyObject *object;
30 BAD: MyObject *object = complex_and_long_init_function(arg1, arg2, arg3);
32 * 80-cols is a guideline, don't make the code uncomfortable in order to fit in
35 * Constants are CAPS_WITH_UNDERSCORES and use the preprocessor.
36 GOOD: #define MY_CONSTANT 42
37 BAD: static const unsigned myConstant = 42;