File: coding-style

package info (click to toggle)
nsd 4.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,776 kB
  • ctags: 4,853
  • sloc: ansic: 34,446; python: 2,085; yacc: 1,774; sh: 925; makefile: 453
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>...
  }