Go to the first, previous, next, last section, table of contents.

Coding Standards

The Xconq sources adhere to a number of coding standards that you should follow also. While everyone has their individual style, it is important to the code's maintenance that the existing style be preserved.

Always allocate by using xmalloc. This routine checks for allocation validity and gives a useful error message if allocation fails, it zeroes the block so you can count on the newly allocated space being in a known state, and it collects statistical data, which is important to optimization.

Always generate a random number by using xrandom. This is a generator of known and consistent properties across all systems that Xconq runs on.

Indent by 4, with tabs at 8. This is effectively what you get in Emacs if you set c-indent-level to 4. System-specific interfaces need not adhere to this rule..


Go to the first, previous, next, last section, table of contents.