unrealircd4

view docs/codingstyle.txt @ 261:c5e7a5a3b563

Add support for the m4/ directory.
author Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
date Wed Jul 07 22:47:17 2010 -0400 (8 weeks ago)
parents
children
line source
1 This document describes the code style reference for the UnrealIRCd Project.
2 We encourage you to follow this recommandation. Writing code is like art,
3 it's not just a pleasure to read clean code - it makes things easier.
5 Before thinking of the first thing, make sure that your editor is writing unix-
6 style newlines. The project is currently using unix-style newlines and mixing
7 in <CR><LF>-type stuff is messy and will produce weird diffs/patches.
9 First of all, make sure you've chosen an editor that supports UTF-8. Any code
10 should be UTF-8 formatted, but make sure to disable BOM signatures for your
11 files. Use real tabs for indentation. I prefer 4 characters per indentation.
12 Any file has to end with an empty line.
14 Class names begin with an uppercase letter, class members with an lowercase
15 letter. Private class members should be suffixed with "_", instead of using
16 the obsolete hungarian notation (m_*).
17 Use comments heavily to describe what your code does. Additionally, please
18 write doxygen-compatible comments in top over each function.
20 Please *never* use the `long' data type, because it's 32bit wide on x86 and
21 64bit wide on x64. That can result in undefined behaviour.
22 Please use `int' or `int32_t' for 32bit integers and `int64_t' for 64bit
23 integers.