Hi, it is okay for the style changes? I have attach a file with it.
--
_____________________________________
< Do what you like, like what you do. >
-------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
diff --git a/suckless.org/style.md b/suckless.org/style.md
index 779cb8d..79fdfe9 100644
--- a/suckless.org/style.md
+++ b/suckless.org/style.md
@@ -43,7 +43,7 @@ Blocks
* All variable declarations at top of block
* `{` on same line preceded by single space (except functions)
* `}` on own line unless continuing statement (`if else`, `do while`, ...)
-* Use block for single statements iff
+* Use block for single statements if
* Inner statement needs a block
for (;;) {
@@ -56,18 +56,19 @@ Blocks
if (foo) {
bar;
+ baz;
} else {
baz;
- qux;
}
Leading Whitespace
------------------
-* Use tabs for indentation
-* Use spaces for alignment
+* Use **tabs** for indentation
+* Use **spaces** for alignment
* This means no tabs except beginning of line
* Everything will line up independent of tab size
* Use spaces not tabs for multiline macros as the indentation level is
0, where the `#define` began
+* Never mix indentation with tabs and spaces
Functions
---------
@@ -76,11 +77,22 @@ Functions
* Opening `{` on own line (function definitions are a special case of blocks
as they cannot be nested)
* Functions not used outside translation unit should be declared and defined
`static`
+ int
+ func(void)
+ {
+ int i = 0;
+
+ printf("( i + 1 ) * 2 = %d\n", (i+1) * 2);
+ printf("Hello World!\n");
+ }
+
Variables
---------
* Global variables not used outside translation unit should be declared
`static`
* In declaration of pointers the `*` is adjacent to variable name, not type
+ int *pointer;
+
Keywords
--------
* Use a space after `if`, `for`, `while`, `switch` (they are not function
calls)
@@ -93,6 +105,12 @@ Switch
* Do not indent cases another level
* Comment cases that FALLTHROUGH
+ switch (ans) {
+ case 'y':
+ case 'Y':
+ return 0;
+ }
+
Headers
-------
* Place system/libc headers first in alphabetical order
@@ -112,9 +130,9 @@ User Defined Types
* Capitalize the type name
* Typedef the type name, if possible without first naming the struct
- typedef struct {
- double x, y, z;
- } Point;
+ typedef struct {
+ double x, y, z;
+ } Point;
Line Length
-----------
signature.asc
Description: PGP signature
