Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
tci-gateway-module
Grpc
Commits
ff298f68
Commit
ff298f68
authored
9 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
First round of feedback
parent
f0d916ae
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/c-style-guide.md
+24
-0
24 additions, 0 deletions
doc/c-style-guide.md
with
24 additions
and
0 deletions
doc/c-style-guide.md
+
24
−
0
View file @
ff298f68
...
@@ -17,6 +17,19 @@ Header Files
...
@@ -17,6 +17,19 @@ Header Files
------------
------------
-
Public header files (those in the include/grpc tree) should compile as pedantic C89
-
Public header files (those in the include/grpc tree) should compile as pedantic C89
-
Public header files should be includable from C++ programs. That is, they should
include the following:
```
c
#ifdef __cplusplus
extern
"C"
{
# endif
/* ... body of file ... */
#ifdef __cplusplus
}
# endif
```
-
Header files should be self-contained and end in .h.
-
Header files should be self-contained and end in .h.
-
All header files should have a #define guard to prevent multiple inclusion.
-
All header files should have a #define guard to prevent multiple inclusion.
To guarantee uniqueness they should be based on the file's path.
To guarantee uniqueness they should be based on the file's path.
...
@@ -31,6 +44,17 @@ C99 Features
...
@@ -31,6 +44,17 @@ C99 Features
-
Variable sized arrays are not allowed
-
Variable sized arrays are not allowed
-
Do not use the 'inline' keyword
-
Do not use the 'inline' keyword
-
Flexible array members are allowed (https://en.wikipedia.org/wiki/Flexible_array_member)
Comments
--------
Within public header files, only
`/* */`
comments are allowed.
Within implementation files and private headers, either single line
`//`
or multi line
`/* */`
comments are allowed. Only one comment style per file is
allowed however (i.e. if single line comments are used anywhere within a file,
ALL comments within that file must be single line comments).
Symbol Names
Symbol Names
------------
------------
...
...
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