Source

oclegacy / source_rules.txt

Title: Technical rules for editing OverChat source
Audience: OverChat source code editors.
Subject: Technical rules
Secrecy: Not really
Author: David Duncan Ross Palmer
Date: 10th Jan 2002
Email: Overlord@DayboLogic.co.uk


1) Copyright notices shall be attached at the top of file and stay intact.
2) Any changes you change to a file may add a note to the copyright but not delete anything.
3) overchat_config.h shall be included before any other source file, including system headers.
4) #pragma hdrstop must only be used if HDRSTOP is defined.
5) ddrptype.h exists for a reason, please do not make your own basic types which are already coded.
6) Comments shall be C comments unless the code can only be seen by C++.
7) Headers must be sentried against multiple inclusion
8) Headers must check for C++ if exporting C symbols.
9) Data musy be static unless there is a good reason for exporting them.
10) Symbols shall not begin with _, this is reserved for the compiler.
11) Exported symbols must be fully qualified.
12) All headers must be added to server.h
13) All modules to include server.h and not specific headers
14) Line termination is UNIX newline delimited format only
15) The following macros may be used to determine the OS: __UNIX__, __WIN32__ and soon __MACOSX__
16) Modules should export an initialisation and cleanup function clearly labeled in the header if they need any dynamic data or mutant.
17) Static and file level data shall be protected by Blake mutants.
18) Module dependencies and assumptions shall be documented.
19) Source changes should be supplied to DDRP as one patch for one problem or feature.  Don't edit a ton of data and send one huge patch.
20) The only acceptable patch is a Unified diff.
21) Files for the server must be named server_????.c
22) No C++ is currently acceptable in the server
23) No direct networking calls shall be made from the server.
24) All server source shall be placed under ./src

The Blake library
=================
24) All exported functions shall include BLAKEAPI in their prototype.
25) BLAKE_AS_DLL can be used to determine if the library is being built as a DLL.
26) Please use BLAKE_SERVER to determine whether to include functions which only the server should use.
27) Blake is very portable, code breaking anything on another platform will not be accepted.
28) Abstraction is good.  Please make wrappers which can be exported to users of Blake.
29) Before overchat_config.h is included, BLAKE_SOURCE must be defined.
30) All files to be named blake_????.c
31) All Blake source shall be placed under ./blake