Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
etherlabmaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ICS Control System Infrastructure
etherlabmaster
Commits
f206d32a
Commit
f206d32a
authored
13 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Again coding style.
--HG-- branch : stable-1.5
parent
b7c1a93e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CodingStyle.txt
+21
-10
21 additions, 10 deletions
CodingStyle.txt
with
21 additions
and
10 deletions
CodingStyle.txt
+
21
−
10
View file @
f206d32a
...
...
@@ -7,16 +7,25 @@ rules are applicable for all C source files, except the Ethernet drivers, for
which the Linux Kernel coding style shall be used to minimize the
differences).
*
Line
s shall not exceed 78 characters.
1)
Line
length
* Indentation shall be done using 4 space
characters
- Lines shall not exceed 78
characters
.
* No w
hitespace
shall be left at the end of a line.
2) W
hitespace
* After a comma, a single space shall be placed (if not followed by a
line break).
- Indentation shall be done using 4 space characters
* Braces shall be placed in the following way (K&R style):
- No whitespace shall be left at the end of a line.
- After commas, colons and semicolons, a single space shall be
placed (if not followed by a line break).
- Binary operators (=, ==, ~=, |, ||, etc.) shall be enclosed by 2 spaces
(except . and ->).
3) Placing braces
- Braces shall be placed in the following way (K&R style):
if (...) {
...
...
...
@@ -31,10 +40,12 @@ differences).
...
}
* Macros shall be named in CAPITAL letters. If a macro contains multiple
statements, they should be enclosed by a 'do {} while (0)' loop. Macro
parameters shall also be capital letters and shall be enclosed py parantheses
if necessary.
4) Defines and Macros
- Defines and macros shall be named in CAPITAL letters. If a macro contains
multiple statements, they should be enclosed by a 'do {} while (0)' loop.
Macro parameters shall also be capital letters and shall be enclosed py
parantheses if necessary.
#define MACRO(A, B) \
do { \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment