diff options
author | fluxgen <fluxgen> | 2001-12-11 20:47:02 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2001-12-11 20:47:02 (GMT) |
commit | 18830ac9add80cbd3bf7369307d7e35a519dca9b (patch) | |
tree | 4759a5434a34ba317fe77bbf8b0ed9bb57bb6018 /doc/Coding_style | |
parent | 1523b48bff07dead084af3064ad11c79a9b25df0 (diff) | |
download | fluxbox_pavel-18830ac9add80cbd3bf7369307d7e35a519dca9b.zip fluxbox_pavel-18830ac9add80cbd3bf7369307d7e35a519dca9b.tar.bz2 |
Initial revision
Diffstat (limited to 'doc/Coding_style')
-rw-r--r-- | doc/Coding_style | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/Coding_style b/doc/Coding_style new file mode 100644 index 0000000..d0eba0d --- /dev/null +++ b/doc/Coding_style | |||
@@ -0,0 +1,45 @@ | |||
1 | The coding style is almost the same as i blackbox. | ||
2 | Instead of 2 spaces there is tab. | ||
3 | It might look strange now in some places, that is because | ||
4 | the code hasnt been "translated" to tab 100% yet. | ||
5 | Use a tab size of 2 and you will be fine. | ||
6 | |||
7 | note if-statement: | ||
8 | |||
9 | if ( stuff ) | ||
10 | function(stuff, more stuff, | ||
11 | more, even more); | ||
12 | else | ||
13 | morefunction( stuff, more stuff | ||
14 | stuff, | ||
15 | stuff, | ||
16 | stuff); | ||
17 | |||
18 | if the functionline needs to be split up, like above, right after a if-statement | ||
19 | use { and }, so its clear when the if-statement ends. | ||
20 | It should look like this | ||
21 | |||
22 | if ( stuff ) { | ||
23 | function(stuff, more stuff, | ||
24 | more, even more); | ||
25 | } else { | ||
26 | morefunction( stuff, more stuff | ||
27 | stuff, | ||
28 | stuff, | ||
29 | stuff); | ||
30 | } | ||
31 | |||
32 | The includeguards: | ||
33 | _FILENAME_HH_ | ||
34 | |||
35 | |||
36 | Function comments: | ||
37 | //------------ function name -------- | ||
38 | // This do that and that | ||
39 | // Returns this on success else | ||
40 | // this on failure. | ||
41 | // TODO: if there is something to do. | ||
42 | //----------------------------------- | ||
43 | type classname::function(...) { | ||
44 | |||
45 | } | ||