There are some general rules: - use C's "best practices"! - keep the 80 char boundary (this is almost universally accepted). - prefer safety and readability to speed. - break lines before an operator. - separate stuff into functions wherever possible and sensible. - initialize variables at the declaration to avoid wild pointers and values. - put variable declarations at the beginning of the functions (as opposed to the beginning of a block). The previous maintainer enforced this all over the code, but since we are bound to using C99 (because of the "long long" type) and I am also a C++ programmer, I will tolerate deviations from this rule. - all operations should be non-destructive (that is, the data structures are always in an consistent state). - coding style should be consistent within one source file. - use static linkage to enhance access - protection and avoid pollution of the global namespace. - use a minimal comment style -- think twice before writing a comment Apart from that, there's only one rule: - stay consistent with the coding style of the source file you are modifying (this concerns spacing and bracing style, for example). The style most generally used goes something like that: if (1 == 1) do (); else { do (); do_more (); } ret_type my_function (void* args, ...) { /* my content */ } Putting ret_type in one line with the function declaration is okay with me, however, since I am not an Emacs user ;) The C standard we are using is C99, but I prefer to comply to ANSI whenever possible. GNU extensions should be avoided if possible. I most likely forgot to discuss some things, so feel free to ask if there are any questions left!