summaryrefslogtreecommitdiffstats
path: root/coding_style.md
diff options
context:
space:
mode:
authormetalefty <meta@vmeta.jp>2016-10-20 15:52:25 +0900
committerGitHub <noreply@github.com>2016-10-20 15:52:25 +0900
commit0c4c52878a414d7df9e509b9eabe422d29c6185a (patch)
tree6d1c34a0f0b598b802af3fdcf31c40d0ad1b64c4 /coding_style.md
parentc9108242cd67159ac0196452e0206410b8a2c343 (diff)
parent6fef1e4eb53877d41f52f2b4d93ea11eb680b6b3 (diff)
downloadxrdp-proprietary-0c4c52878a414d7df9e509b9eabe422d29c6185a.tar.gz
xrdp-proprietary-0c4c52878a414d7df9e509b9eabe422d29c6185a.zip
Merge pull request #444 from proski/trivial
Simple changes, mostly log messages and documentation
Diffstat (limited to 'coding_style.md')
-rw-r--r--coding_style.md17
1 files changed, 16 insertions, 1 deletions
diff --git a/coding_style.md b/coding_style.md
index 584dac78..cf096ac8 100644
--- a/coding_style.md
+++ b/coding_style.md
@@ -15,6 +15,13 @@ Here is how we run the astyle command:
This coding style is a work in progress and is still evolving.
+Language Standard
+-----------------
+
+Try to make all code compile with both C and C++ compiler. C++ is more
+strict, which makes the code safer.
+
+
Indentation
-----------
@@ -32,7 +39,7 @@ Indentation
Line wrapping
-------------
-* Keep lines shorter than 80 chars
+* Keep lines not longer than 80 chars
* Align wrapped argument to the first argument
@@ -46,9 +53,11 @@ Variable names
* Use lowercase with underscores as needed
* Don't use camelCase
+* Preprocessor constants should be uppercase
+ #define BUF_SIZE 1024
int fd;
int bytes_in_stream;
@@ -193,3 +202,9 @@ Braces
default:
printf("bad cmd\n");
}
+
+Comments
+--------
+
+Use /* */ for comments
+Don't use //