[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [glob2-devel] Coding conventions
From: |
Andrew Sayers |
Subject: |
Re: [glob2-devel] Coding conventions |
Date: |
Mon, 11 Jul 2005 18:11:57 +0100 |
User-agent: |
Mutt/1.5.9i |
Another convention you should mention - the one I fell foul of - is that
CVS branches are fine (and encouraged for major changes?), but should
relate to some specific feature, and should be named after that feature
(e.g. "using_libToto" instead of "TotosStuff".
Some others I'd like to see added are:
* typedefs that specify a low-level physical layout are written like
"Uint8". The layout must be spelled out in the name - for example,
"Uint8" is an unsigned integer 8 bits long, Sfloat16 is a signed
floating point number 16 bits long.
* typedefs and enums that specify a high-level logical idea are written
like "toto_friendliness_t". This is the way C does it, and adding the
"_t" on the end makes emacs realise it's a type.
* where there is a clash between a function name and a variable name
(i.e. you have a private variable "toto", accessible through
a public function toto()), the variable should have "_v"
appended to it. Note that this is only allowed when the function is
a public wrapper around a private variable in a class.
* constants are named like variables, except they have "_c" appended to
them if they're shadowed by a function name.
- Andrew