File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Code style
2
2
3
+ The code style guidelines in this document apply to Contiki-NG source
4
+ files written in the C programming language. Source files written in
5
+ other programming languages should follow a common style convention if one
6
+ exists; e.g., PEP 8 for Python. Moreover, if a specific code style is already
7
+ commonly used for a given language in the repository, it is encouraged to
8
+ follow this code style.
9
+
10
+ ## Standard compliance
11
+
12
+ Contiki-NG programmers should adhere to the ISO/IEC 9899:2011 standard
13
+ (also referred to as "C11") as much as possible. Observe that this guideline
14
+ is currently limited to the subset of C11 supported by GCC 4.7 in order to
15
+ ensure that MSP430-based platforms continue to work.
16
+
17
+ When writing architecture-specific source code for the native platform, one
18
+ should also adhere to IEEE Std 1003.1-2017 (also referred to as "POSIX") when
19
+ possible. For other architecture-specific source code, it is acceptable to
20
+ rely on compiler extensions where this is necessary.
21
+
3
22
## Naming
4
23
5
24
* File names are composed of lower-case characters and dashes. Like
@@ -90,7 +109,7 @@ Below is an example .c files that complies with the Contiki-NG code style:
90
109
/* Single line comments look like this. */
91
110
92
111
/*
93
- * Multi-line comments look like this. Comments should prefferably be
112
+ * Multi-line comments look like this. Comments should preferably be
94
113
* full sentences, filled to look like real paragraphs.
95
114
*/
96
115
You can’t perform that action at this time.
0 commit comments