FreeSWITCH          




Page tree
Skip to end of metadata
Go to start of metadata

About

When submitting patches or otherwise adding code to the project please follow some basic coding guidelines.
Most .c files will have this information at the very end for your reference:

 Click here to expand Table of Contents

Structures and Curly Braces

Please observe these conventions:

  • Tabs are preferred over spaces, tab-width is four characters
  • Always use curly braces for conditional statements *unless* they are on the same line and are very short
  • Always space after if
  • Nested else
  • Function definitions with newline

Comments

Please use comments appropriate to the language you are using.

C

Use /* and */ when adding comments in C programs. Please don't use // for comments in C programs.

C++

Use the // style for C++ programs

Lua

Lua has two styles of comments:

  • Single Lines
  • Multiple Lines
  • No labels