#include #include "local includes, en empty line before these" extern struct foo foox; /* extern structure */ int function(foo); /* prototype for a function that is only used on this file (rest in .h) */ /* if it's unclear.. document the return values here. generic spamserv functions are s_*(), the ones related to irc (irc.c mostly) are i_*() */ int s_function(foo) { GIOChannel chan; int functiondefinitions; int gohere; /* order the definitions so that Glib datatypes are on the top :) */ /* ^^ empty line! */ while (foo) { bar(); } int i = 5 + 5; /* note the spaces */ /* no c++ style comments! */ /* use glib stuff when possible, e.g.: g_strdup() instead of strdup() */ foo(argument1, argument2); /* proper use of spaces */ return 1; }