Update coding style document for macro style
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 19 May 2016 15:57:44 +0000 (11:57 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 May 2016 18:20:48 +0000 (14:20 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
CodingStyle

index 1d8bd9b43130847893e65ce09c533a89f282ca93..6ff931b150cc920ded9e7ba6807059a8fa814922 100644 (file)
@@ -31,14 +31,22 @@ enum my_enum {
 #define DEFAULT_VALUE_OF_SOME_SORT   6
 #define THE_ANSWER                   42
 
-Use space to indent the '\' at the end but tabs at the beginning.
+Use either a single space or tabs to indent the '\' at the end of lines.
+Use tabs at the beginning of lines.
 
-#define a_macro(x)      \
-       do {                \
-               fsync();        \
+Either:
+
+#define a_macro(x) \
+       do { \
+               fsync(); \
        } while (0)
 
-It's really the only time we use spaces. For everything else, there is TABS! :)
+or
+
+#define a_macro(x)             \
+       do {                    \
+               fsync();        \
+       } while (0)
 
 Here is a pretty cool vim macro that will highlight your whitespaces and spaces
 before tab. This helps a *LOT* when coding.
This page took 0.025482 seconds and 4 git commands to generate.