[Xfce4-commits] <squeeze:master> Add HACKING file with coding-style guide

Stephan Arts noreply at xfce.org
Wed Aug 24 22:10:01 CEST 2011


Updating branch refs/heads/master
         to 58892c1babe8c3ff833f53a0749265cace7e4423 (commit)
       from fd437a3d47a91f82b1562fa9328fcdfbdcd2a6be (commit)

commit 58892c1babe8c3ff833f53a0749265cace7e4423
Author: Stephan Arts <stephan at xfce.org>
Date:   Wed Aug 24 22:08:46 2011 +0200

    Add HACKING file with coding-style guide

 HACKING |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..ec55d0d
--- /dev/null
+++ b/HACKING
@@ -0,0 +1,25 @@
+
+
+Coding Style:
+ * Indententation: four spaces, no tabs.
+ * Braces: On the lines below if,where,etc... statements.
+ * Function declarations: return type goes on the first line, function name
+    and first parameter on the second line.  Second and further parameters
+    each get their own line, and they should be aligned with the start of
+    the first parameter.  Please do not add spaces between the type and
+    variable name to line up the variable names.  As specified before, the
+    opening brace also gets its own line.
+    If the function has no arguments, specify (void) in the declaration.
+ * Comparisons: put constants on the left-side of the comparison, when the
+    comparison is accidently replaced by an assignment, the compiler will
+    warn about it.
+
+ * Parentheses: always put spaces around parentheses in for,while,switch
+    and if statements. Functions and macro's are different, only put spaces 
+    around the arguments, but keep the '(' against the function or macro
+    name.
+
+ * EXAMPLES:
+    if ( NULL == ptr )
+    {
+    }


More information about the Xfce4-commits mailing list