File: coding-style

package info (click to toggle)
nsd 4.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,260 kB
  • sloc: ansic: 64,435; sh: 4,351; python: 2,085; yacc: 1,344; makefile: 688
file content (17 lines) | stat: -rw-r--r-- 368 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Coding Style for NSD

[This is incomplete, but a start]

o No space after function/keyword
o { on the same line as the if/while/for statement
o If an 'if' has one statement in the 'then' part omit the braces:
        if (!x) 
                return NULL;

  Indent the 'then' part with tabs
o Function:
  return-type
  functionname(parameters, ...)
  {
  <tab>...
  }