This is TikiWiki 1.9.7 -Sirius- © 2002–2006 by the Tiki community Mon 06 of Sep, 2010 [11:24 UTC]
Menu [hide]

Coding Style

print

Code formatting

The code formatting in the openChrome driver is currently a mess. It is the result of having several different developers, each coding in his own way. The goal is to get as close as possible to some kind of Xorg unified coding style. If the instructions below differ substantially from what's current practice, they will be revised.
  • Function names start with a lowercase letter and are written like this:
    viaFunctionName()
    As a general rule all functions should start with the prefix "via", however to improve clarity, static functions are allowed to start with other names.
  • Variables also start with a lowercase letter:
    numOfScreens
    Global variables should be avoided.
  • Type names start with an uppercase letter:
    ViaMagicType
    Structs are wrapped with typedef.
Indentation and general formatting should be done with the command:
indent -bad -bap -c40 -cd0 -ncdb -ci4 -cli0 -cp0 -ncs -d0 -di4 \
       -i4 -ip4 -l78 -nlp -npcs -psl -sob -ss -br -ce -sc

See also the Xorg coding style page.

ChangeLog

Before committing something to the SVN repository, you should produce a ChangeLog? entry. When merging a branch, don't incorporate all ChangeLog? entries from the branch into the trunk. Just mention that you've merged a specific branch between revisions x and y, and where the detailed changelog can be found. To aid in ChangeLog? writing, go to the directory where the ChangeLog? file is created and run the script
./prepareChangeLogSVN.pl
which will create a changelog entry for you to fill in. Use the same text for the commit message.

Created by: thomas last modification: Saturday 19 of August, 2006 [19:34:42 UTC] by benno


Powered by TikiWiki Powered by PHP Powered by Smarty Powered by ADOdb Made with CSS Powered by RDF
RSS Wiki RSS File Galleries RSS Forums
[ Execution time: 0.22 secs ]   [ Memory usage: 8.06MB ]   [ 22 database queries used ]   [ GZIP Enabled ]   [ Server load: 0.24 ]