summaryrefslogtreecommitdiffstats
path: root/HACKING
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-08-04 21:24:48 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-08-04 21:24:48 +0000
commit6483c9584b1bf5a468276250805bedc1ee1edd3d (patch)
tree9819677837dad23d67e4330b6a9f8acea6b20e1e /HACKING
parent6f48cba5e81959bf43bf6a0d668f9bda1e4545b8 (diff)
downloadlasso-6483c9584b1bf5a468276250805bedc1ee1edd3d.tar.gz
lasso-6483c9584b1bf5a468276250805bedc1ee1edd3d.tar.xz
lasso-6483c9584b1bf5a468276250805bedc1ee1edd3d.zip
update
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING30
1 files changed, 23 insertions, 7 deletions
diff --git a/HACKING b/HACKING
index c3dc10e4..a30bb527 100644
--- a/HACKING
+++ b/HACKING
@@ -8,13 +8,13 @@ Coding Style
Examples:
BAD:
- ``if(a)``
+ ``if (a)``
BAD:
- ``if(a!=NULL)``
+ ``if (a!=NULL)``
GOOD:
- ``if(a != NULL)``
+ ``if (a != NULL)``
GOOD:
- ``if(a != 0)``
+ ``if (a != 0)``
- Put figure brackets ``{}`` even if you have only one operator
in ``if``, ``for``, etc. This also makes code easier to read and
@@ -24,12 +24,29 @@ Coding Style
BAD:
.. line-block::
- if(a != NULL)
+ if (a != NULL)
message(G_LOG_LEVEL_MESSAGE, "Ko");
GOOD:
.. line-block::
- if(a != NULL) {
+ if (a != NULL) {
+ message(G_LOG_LEVEL_MESSAGE, "Ok");
+ }
+
+- Put SPACES before the opening round bracket and after the closing round
+ bracket. One more time, it improves the readability of the code.
+
+ Examples:
+ BAD:
+ .. line-block::
+
+ if(a != NULL){
+ message(G_LOG_LEVEL_MESSAGE, "Ko");
+ }
+ GOOD:
+ .. line-block::
+
+ if (a != NULL) {
message(G_LOG_LEVEL_MESSAGE, "Ok");
}
@@ -42,4 +59,3 @@ Coding Style
``return(0);``
- Check for memory leaks.
-