Coding Style from X.org (sumber asli : http://xorg.freedesktop.org/wiki/CodingStyle)
Kemarenan aku iseng-iseng masuk ke X.org rencananya mau upgrade Xorg di komputerku, hehehehe, gak sengaja nemu link ini, kayaknya bagus buat referensi, isi dokumennya gini :
=== begins document ===
Much of this is lifted from the XFree86 CODING doc, which describes the xfree86 DDX and (to a lesser extent) the DIX layer as well.
* Four-space indents
* camelCase function names
* 78-column limit
*
Function return type (and any modifiers, eg static) on a line by itself
*
Keywords punctuated like if (x >= 0)
*
Functions punctuated like doSomethingClever(a, b, c);
*
Opening curly brace on the same line as the control construct: if (foo) {
o
Closing braces aligned with the keyword that opened them (K&R not GNU)
o
else on the same line as the closing } of the preceding if
* Opening curly brace for functions in column 0
*
case aligned in the same column as the switch
* Wrap structs in typedefs
*
ANSI prototypes for all new code; convert K&R declarations to ANSI with care
Notable objectionable things in the current coding style:
* Most structs have a typedef both for the struct and for a pointer to the struct.
=== ends document===
semoga bisa jadi referensi yang berguna yak…
mogi
2007