There are a few standards that the XOSD authors (Tim and André) follow; for the sake of readability it is best if any new code follows these standards.
Use the C-99 standard when writing code, except in the xosd.h header-file, which should use Ansi-C (C-89). While GCC does not implement all of C-99, it implements the useful features, such as single line comments (//).
Use single-line comments (//) in preference to multi-line comments (/* */), except in the xosd.h header-file, which should use multi-line comments only.
Put spaces between function names and the parameters that follow.
Public functions must begin with xosd_ and have a forward-declaration in the xosd.h header-file; all functions that are private must not begin with xosd_.
Public constants must begin with XOSD_ and are declared in the xosd.h header-file. Numeric constants are declared as part of an enumerated type-definition (typedef enum) the names of which are formatted like functions.
The xosd structure shall remain hidden, and all modifications to fields shall be done through setter functions.
Document functions added to the xosd.h header-file should have a brief man-page like comment written just before the function declaration. The comment should contain the following.
The function name, along with the purpose of the function;
A list of the function arguments, titled ARGUMENTS, with an explanation of each argument; and
The return value for the function, titled RETURNS, with an explanation on how the return value should be interpreted.
When testing code using GCC, turn all warnings on (-Wall).